You are not logged in.
Hey all, I just `pacman -Syu`'d last night, and now when I use `mkdir`, it defaults to using 777 instead of 755, and I have no idea why. I tried adding `alias mkdir=mkdir -m755` in my zshrc, but that didn't help, so I'm gonna post here. Is there some way for me to change the default?? Having to `chmod 755` after every mkdir is _really_ annoying.
Offline
What is the output of `umask`?
Offline
the umask is set in /etc/profile. Is that not getting sourced? Unmerged pacnew files?
Offline
What is the output of `umask`?
`000`
Offline
the umask is set in /etc/profile. Is that not getting sourced? Unmerged pacnew files?
Its entirely possible, but I'm not sure what I would have done to cause that to happen? Where is it sourced by default?
Offline
It's sourced by most shells when they're started as a login shell.
Offline
It's sourced by most shells when they're started as a login shell.
Huh, thats really odd. I guess zsh doesn't source it for whatever reason as of the latest version?? adding `source /etc/profile` to my zshrc fixed it.
Offline
How are you logging in?
Edit: zsh sources it by default on Arch from /etc/zsh/zprofile.
Last edited by Scimmia (2020-12-05 20:26:41)
Offline
How are you logging in?
Edit: zsh sources it by default on Arch from /etc/zsh/zprofile.
I log in directly through tty.
I have a custom .zprofile, maybe thats the issue.
This is my .zprofile:
if systemctl -q is-active graphical.target \
&& [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
xinit;
fi;Offline
~/.zprofile won't cancel out /etc/zsh/zprofile.
What's in $PATH right now?
Offline
~/.zprofile won't cancel out /etc/zsh/zprofile.
What's in $PATH right now?
/home/jack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/binOffline
So the perl paths aren't in there twice, which they would be if you were sourcing /etc/profile twice, so it does appear it's not getting sourced when you log in. Unless you're logging in with a different shell then starting zsh or /etc/zsh/zprofile is messed up, I don't know what's going on.
Offline
So the perl paths aren't in there twice, which they would be if you were sourcing /etc/profile twice, so it does appear it's not getting sourced when you log in.
Would the use of append_path() in profile prevent the perl paths being added twice?
Offline
zsh -lxc exit > /tmp/zsh.trace 2>&1You can then inspect /tmp/zsh.trace for whether/when /etc/profile is source, where and how umask is set etcetc.
Are you btw. using OMZ?
Offline
Scimmia wrote:So the perl paths aren't in there twice, which they would be if you were sourcing /etc/profile twice, so it does appear it's not getting sourced when you log in.
Would the use of append_path() in profile prevent the perl paths being added twice?
You're right, it would. I forgot that changed a few months ago, so my test was invalid.
Offline
zsh -lxc exit > /tmp/zsh.trace 2>&1You can then inspect /tmp/zsh.trace for whether/when /etc/profile is source, where and how umask is set etcetc.
Are you btw. using OMZ?
Yep, i'm using OMZ.
Looks to me like its sourcing /etc/profile at the beginning, but then it does it again at the end when I source it manually. Perhaps something is undoing the changes done by /etc/profile in between?
Offline
Perhaps something is undoing the changes done by /etc/profile
Yep, i'm using OMZ.
Try to un-use that and whether the situation remains the same.
Offline
Someone asked already what your umask was, and apparently it is 000 ....
The umask is a (not) bit flag.... try setting it to 006
do:
# see what the umask is
umask
# change the umask to restrict others
umask 006
# see the umask, it should be changed
umask
# make a file
touch test
# see the permissions
ls -l testif that works then set the umask in the /etc/profile to make system-wide.
Is this the problem?
Offline
https://bbs.archlinux.org/viewtopic.php … 2#p1941892
The entire problem of this thread is that something™ (it's gonna be OMZ because it's always OMZ…) overrides the umask set in /etc/profile
Offline
if that works then set the umask in the /etc/profile to make system-wide.
Is this the problem?
You know, the umask is system-wide /etc/profile as 022...
And he's using OMZ, the so widely know to cause breakage is seems (I haven't used it, only thing I tried on my zsh days was grml cause the archiso looked quite neat)
So, lets wait for OP to un-use OMZ and report if the issue persists.
Last edited by GaKu999 (2020-12-06 21:52:50)
Offline