Quantcast
Viewing latest article 3
Browse Latest Browse All 4

Answer by Christopher for ACLs - the same acl's on all newly created files automatically

On your system, the files in /tmp disappear on reboot, right? Maybe this is not a good location for a permanent solution. When setting an ACL on a directory that should apply the ACL to all new file system objects in the directory, remember to set two masks: (1) the mask for the directory itself and (2) the default mask (for all new filesystem objects).

setfacl -m u::rwx,g::r-x,o::--- /tmp/test
setfacl -d -m u::rwx,g::r-x,o::--- /tmp/test

Above, the -m switch is the mask for /tmp/test, and the -d switch makes the mask the default mask for all new filesystem objects in the same directory. It's equivalent to 0750. Octal values can be used also.

The user, group, and other masks work the same way: g:groupname:--- or in combination: u:username:---,g:groupname:---,o::---. Not specifying a username or group name applies the mask to current user/group ownership.

Be aware that not all software is aware of ACLs. For example, not all SFTP/SCP clients know about them yet.


Viewing latest article 3
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>