Wednesday, May 30, 2018

apache userdir jail permissions

On Debian 8 I'm running apache2 in a jailed environment using jailkit and the userdir mod. In current jail setup users can navigate into another users directory i.e



/home/jail/home/anotheruser


and view files in it but can navigate into folders



I tried jailing users to their home folder using




chmod 0700 /home/jail/home/*


now when i try to navigate into another users directory i get



 Permission denied


But now when I broswe to the users website I get




You don't have permission to access / on this server.


It worked before I did the chmod. So how do I jail user to their home but still allow they websites to be viewed?



I tried adding www-data to a users group



groups test
test : test


usermod -a -G www-data test
groups test
test : test www-data


But still get permission denied.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...