0

i have to enable apache website access using suphp and enable ssh as well. i have enabled cagefs but i am not able to chroot each user into their own directories. I want that no user leaves his home directory to see files of other users.

When is set directory permissions of /home/user1 to 700, i get error that apache cannot read the .htaccess file inside the website. it only works with permission 755 (other users having read permission). is there any way out with using suphp? that i can use permissions 700 for all home directory users? or may be 750 ?

1

You can add an extended acl to all the home directories:

setfacl -m u:apache:rx <user's home>

If needed you can add the same acl again, just include the .htaccess file. That way you can maintain the POSIX permissions of 700.

  • setfacl: /home/user2: Operation not supported :( – Farhan Nov 3 '16 at 17:11
  • You may need to install the package first, although it is a little strange it's not there. – Brett Levene Nov 3 '16 at 17:18
  • ...or if you're using Ubuntu you might have to amend your fstab to allow acls. – Brett Levene Nov 3 '16 at 17:23

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.