Quote:
Originally Posted by Winanjaya
Hi All.
How to make 2nd root that only has access to:
His own home and /var/www/hrml/hisdomain ?
But he can start/restart httpd service.
I am running CentOS 7
|
You don't make a 'second root', with limited access. Having a root account says they have UNLIMITED access to everything; that's what the root account is. After working with Linux and Apache for SIXTEEN YEARS now, you should be well aware of what the root account is, and how it works.
Why don't you add a user to the sudoers file, giving them rights to run "service apache2 restart", and group access to whatever directory you want to have their HTML files in. You could also enable the "FollowSymLinks" directive in Apache, and have their web files in their own home directory, with a symlink to the /var/www/html/<something> folder.