E
E
Evgeny2015-01-27 16:59:04
linux
Evgeny, 2015-01-27 16:59:04

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

3 answer(s)
I
Igor, 2015-01-27
@jennik

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.

A
Alexey Sundukov, 2019-01-15
@alekciy

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.

A
Andrey Sanych, 2017-08-16
@LamerX

why doesn't it work? https://jsfiddle.net/nzphpgck/
and remove type="text/babel"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question