User Tools

Site Tools


unix:file_permissions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
unix:file_permissions [2023/08/17 10:29]
manu [Umask: file creation rights]
unix:file_permissions [2023/08/17 11:00] (current)
manu [Umask: file creation rights]
Line 195: Line 195:
 My file is created with permissions **666-022=644** My file is created with permissions **666-022=644**
  
-On AIX a umask is specified by default into /​etc/​security/​user,​ you can specify one per user+On **AIX** a umask is specified by default into **/​etc/​security/​user**, you can specify one per user
   # chuser umask=022 user01   # chuser umask=022 user01
   ​   ​
-On linux+On **linux** the default mask is defined into **/​etc/​bashrc**,​ maybe also into **/​etc/​login.defs**. For custom, you can either add into homedir from every user, or globaly by script, you can add it to /​etc/​bashrc 
 +<​code>​ 
 +if [ $UID -gt 199 ] && [ $(/​usr/​bin/​id -gn) == $(/​usr/​bin/​id -un) ] 
 +then 
 +  umask 444 
 +else 
 +  umask 555 
 +fi 
 +</​code>​
  
unix/file_permissions.1692260982.txt.gz · Last modified: 2023/08/17 10:29 by manu