0

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.

2 Answers 2

2

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.

0

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.

3
  • Traditionally you can not, but if you have Access Control Lists enabled (the questioner is asking about ACLs), then you can. Enable in kernel, and filesystem, then use 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
  • Look at this question/answer, to find out about the other permissions modes etc that a file can have. unix.stackexchange.com/questions/101263/… (note this question is about (Gnu/Linux) so it won't apply 100% to solaris or other Unix. Commented Jul 21, 2014 at 15:49
  • Didn't know, I'll check that info. Thaks.
    – YoMismo
    Commented Jul 21, 2014 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .