0

In an ubuntu server 18.04, I have 2 users: userA and userB. There is a folder

/home/userA/data

I am going to get read, write, execute access of data to userB.

unfortunately the command

chown userB /home/userA/data

does not work.

rahram
  • 113
  • 4
  • Are you wanting both userA AND userB to have RWX on /home/userA/data? Or to change ownership of the location to ONLY userB? Are you sure chown is what you want to use, and othwerwise not to create a group consisting of userA and userB, and then grant that group ownership+rwx perms to /home/userA/data? Which system user are you executing chown as? – njs-se Nov 21 '18 at 14:40
  • what does the command return? the command is correct, do you (the user running the command) have permissions over `/home/userA/data`? – Jorge Valentini Nov 21 '18 at 20:44

1 Answers1

0

Use setfacl

https://www.2daygeek.com/how-to-configure-access-control-lists-acls-setfacl-getfacl-linux/#

setfacl -m u:userB:rwx /home/userA/data
setfacl -m u:userB:x   /home/userA
setfacl -m u:userB:x   /home
rahram
  • 113
  • 4