Could you help me to provide read/write access to a folder, its sub-folders and all the files below for a particular user?
I tried to use the getfacl
command, but didn't find a solution. I'm using solaris 10.
You need setfacl
.
setfacl -R -m ${other_user}:rwX,d:${other_user}:rwX
I added default (d) as this us usually best to keep it correct.
-R
is recursive
I think you need to do something with x
permission as the named user and you can add directories -- I added X
, I thing that is correct.
If you mean modifiying permissions to your own user chmod -R 600 *
will grant r/w acces to the user in all files and subdirectories, if you are talking about adding permission to other user while you retain the property of that file, then you can't.
Permissions are granted to the user (owner of the file) group and others, so either you add that user to the group of the original user or you give permissions to others which will allow anyone to read/write that file.
setfacl
to set, getfacl
to read. ls
will show a +
e.g. -rwxrw----+
(in this case group shows the super set of all named permissions except owner) you need to use getfacl
to see the detail.
Commented
Jul 21, 2014 at 15:38