Clarify umask feature
If I am not wrong, this is how umask is calculated.
for dir, 777 - 022(root's umask value) = 755. for file, 666 - 022(root's umask value) = 644. Now, where this umask value is defined? Is it the /etc/bashrc file?. If so, then what is the file /etc/login.defs for? My /etc/login.defs file says 077 as umask - what does this mean? Also where is cmask defined? The umask can be changed using umask command, but that is temporary. Right? If I have to make it permanent, I can edit .bashrc file in my home dir and append "umask value" to it. Also, say I am root and I want to set a specific umask for all other users, how to do that? Thanks for your time and assistance in advance. |
Clarify umask feature
The bashrc in your home directory overrides the system wide settings in /etc.
So to control users you can set in there home bashrc. |
Quote:
Quote:
Code:
# Quote:
Quote:
Code:
bullshark@beastlinux ~ $ crontab -l | tail -2 Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Also, Setting it for a partition means, whoever the user maybe, if they create files or dir under that partition, that file/dir will get the pre-defined permissions. Is that's the case? Coming to login.defs -- my login.defs says umask as 077. But whereas when i create files/directories using any user in my system, it doesn't seem to follow 077, instead it is 022. I checked .bashrc of all users and found no overriding also. What does this 077 implies? why it's not being implemented? what overrides that? |
All the examples I looked at only used umask for fat and ntfs partitions in the fstab, so I could be wrong.
|
All times are GMT -5. The time now is 11:59 AM. |