Answer the question
In order to leave comments, you need to log in
How to set default umask?
Hi guys!
Centos 6 system. It has the user vasya . Its umask is 022. It needs to have a default umask of 002.
Adding umask 002 to .bashrc and .bash_profile only helps if the file is created via bash. This is not suitable, because it is necessary that any program (be it php or ftp, etc.) launched on behalf of this user by default creates all files with umask 002.
How to do this?
Answer the question
In order to leave comments, you need to log in
If php or ftp will work from this user, they should also pick up the mask, however, in the same php scripts, the mask can be overridden.
If the ultimate goal is to set a default umask for a given directory with inheritance from this directory, then it can be done through ACL. If at the same time it is necessary to inherit the group as well (if we have several users and they should be able to read and write files in a certain subtree of the FS), then for such a directory you also need to set the setGID bit.
why doesn't it work? https://jsfiddle.net/nzphpgck/
and remove type="text/babel"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question