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 ?

Farhan
  • 4,210
  • 9
  • 47
  • 76
  • I dunno if it can help you, but here yuo can find a nice article on Chroot Jail : http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html – Froggiz Nov 03 '16 at 21:27

1 Answers1

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.

Brett Levene
  • 776
  • 6
  • 9