0

I have two directories

/home/user1/htdocs/  
/home/user2/htdocs/

I have provided permission to www-data using:

chown -R www-data:www-data /home/user1/htdocs/  
chmod -R 755 /home/user1/htdocs/

Then used ACL to provide permission to the site user user1 using:

setfacl -m u:usr1:rwx /home/user1/htdocs/  
setfacl -m u:usr1:000 /home/user2/htdocs/

The later one works with permission 000 works but the 1st ACL statement does not work as I could not write to htdocs using user1.

  • What do you mean by "could not write to htdocs"? – muru Jul 3 '17 at 5:30
  • What does getfacl /home/user1/htdocs and getfacl /home/user2/htdocs give you? Alternatively I'ld recommend you archiving what you want using chown -R user1:www-data /home/user1/htdocs meaning: user1 gets full access, www-data may still read and execute – derHugo Jul 3 '17 at 7:23
1

Instead of

chown 755 /home/user1/htdocs/

You have to run

chmod 755 /home/user1/htdocs/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.