How Do I Set Default Permissions in Linux?
Contents to Change the Default Permissions That Are Set When You Create a File or Directory Within a Session or with a Script, Use the Umask Command. the...
Contents
To change the default permissions that are set when you create a file or directory within a session or with a script, use the umask command. The syntax is similar to that of chmod (above), but use the = operator to set the default permissions.
How do I change the default permissions?
From the article:
- Set the setgid bit, so that files/folder under <directory> will be created with the same group as <directory> chmod g+s <directory>
- Set the default ACLs for the group and other setfacl -d -m g::rwx /<directory> setfacl -d -m o::rx /<directory>
Must Read
How do I change the default permissions in Unix?
To change file and directory permissions, use the command chmod (change mode). The owner of a file can change the permissions for user ( u ), group ( g ), or others ( o ) by adding ( + ) or subtracting ( – ) the read, write, and execute permissions.