Rolled on the apache2-mpm-itk server in order that each site was started under the user. Everything works, but I do not want users to be able to view the file structure of the entire server.

That is, each site is in its own directory:

/var/www/example.ru/public_html/index.html /var/www/example2.ru/public_html/index.html 

How to make the user of the site example.ru not able to rise above its directory?

  • In order that the user could not see the contents of his own directory, you can put the rights 750 or 700 for it. Usually hosters are limited to this. There is no ready solution for this problem, you need to look in the direction of chroot. - Marsel Arduanov
  • but then you’ll have to set up 750 permissions on all directories above, I don’t think this is a way out - Artem Chernov

1 answer 1

You can limit the visibility of users, for example, using the built-in ability to openssh to chroot for users.

See the answer to this question: Prevent listing the root directory when connecting SFTP (SSH File Transfer)