Change default permissions for new files and folders
26,346
From the article:
chmod g+s <directory> //set gid
setfacl -d -m g::rwx /<directory> //set group to rwx default
setfacl -d -m o::rx /<directory> //set other
Next we can verify:
getfacl /<directory>
Output:
file: ../<directory>/
owner: <user>
group: media
flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
Author by
Ali
I found R as a perfect answer to my problems in bioinformatics, and Stackoverflow as a perfect answer to my problems in R.
Updated on September 18, 2022Comments
-
Ali almost 2 years
Every time I create a new file or folder in Linux, it is accessible for r/w by myself, not the group. I want to change my system setting such that every new file or folder will be automatically accessible by the group. Is there anyway?
-
Oldskool over 8 yearsThis is inaccurate,
umask
works the other way around thanchmod
. Setting an umask of 777 would give nobody permission to do anything (the permissions set would be 000). -
Timber almost 7 yearsLooks like a copy pasta answer from: unix.stackexchange.com/a/1315