Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umask override in ~/.profile for root and vagrant #16

Closed
l0b0 opened this issue Nov 9, 2014 · 1 comment
Closed

umask override in ~/.profile for root and vagrant #16

l0b0 opened this issue Nov 9, 2014 · 1 comment
Assignees
Labels

Comments

@l0b0
Copy link

l0b0 commented Nov 9, 2014

On my host, where I to the best of my knowledge have never changed the umask:

$ sudo bash -c umask
0022
$ grep ^umask /etc/profile
umask 022

On the Arch Linux Vagrant box:

vagrant@archlinux:~$ sudo bash -c umask
0027
vagrant@archlinux:~$ grep ^umask /etc/profile
umask 022
vagrant@archlinux:~$ sudo grep ^umask /root/.profile
umask 027

Why is this more restrictive than normal?

@l0b0 l0b0 changed the title Restrictive umask umask override for every user Nov 9, 2014
@l0b0 l0b0 changed the title umask override for every user umask override in ~/.profile for root and vagrant Nov 9, 2014
@terrywang
Copy link
Owner

Hi @l0b0 the $HOME/.bashrc and $HOME/.profile were copied from my Arch Linux running on my netbook. It is just my long time security best practice (10+ years).

I don't think the default value 0022 is good anyway. 0027 is ONLY moderate, which denies w for group and rwx for others.

$ umask 
0027
$ umask -S
u=rwx,g=rx,o=

In short, this will ensure no other users have read/write/execute access to the files/directories created by $USER.

By using $HOME/.profile it overrides at per user level, feel free to change it ;-D

proycon added a commit to proycon/LaMachine that referenced this issue Dec 9, 2016
@terrywang terrywang self-assigned this Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants