Another setfacl question

Soldato
Joined
18 May 2010
Posts
22,969
Location
London
I have been succesfully setting individual acl on folders and files using the setfacl command.

However using setfacl -R -m u:username:rwx

sets the defaul user to username which is fine as it allows the user to access folders/files created by others whom they are not part of the same group access.

However now I want to change the default user to differentuser

I tried: setfacl -R -m u:differentuser:rwx this gave differentuser access to the folder I wanted them too have but noticed that the default user was still set to username.

How do I change the default user to differentuser.

Thanks
 
Last edited:
I'm not quite sure what you mean by "default user" in this context.

With both commands you are setting the users' rights mask on the files to be rwx and applying that recursively, (not knowing the details I would have maybe considered applying a default acl to the directory instead of recursively to the files themselves, i.e. by using d:u:user:mask).

If you just want to replace username with differentuser have you tried removing the acl related to username (-x instead of -m ?)
 
Ok the -R switch, seems to not just set the permissions recursivley but also sets the default user (extended ACL) aswell.

What I originally wanted to do was set acl recursivly on a directory once and have the acl default when ever some one creates a document or folder in the directory to which the user I have set the individual acl is not part of the same group.

Setting the -R switch I noticed put an entry called defaultuser in the extended acl's to the username I set it to.

It has worked fine so far..... untill I wanted to change the default user.....
 
Back
Top Bottom