Angus
Angus

Reputation: 12621

How to identify the ACL owner

If I set multiple users with different permissions using setfacl for a file, will there be many ACL Blocks for the same file. If so how to identify the ACL owner.

Upvotes: 1

Views: 198

Answers (1)

user2845360
user2845360

Reputation:

The getfacl utility will show you as owner of the ACL whichever user owns the file on the filesystem and of course you can see that from the output of ls -l too.

For example, try the following:

touch j
# clean slate, just default entries
getfacl j
setfacl -m user:`id -un`:rwx j 
# note how now you have a named acl entry with rwx
getfacl j                          
sudo chown lp j  
# the following will fail, you have no acl access                                        
setfacl -m user:`id -un`:rw- j
# but this will work, because of 1st setfacl
echo "foo" >> j

So, owner of the file and the owner of the ACL boils down to the same thing.

Upvotes: 1

Related Questions