How to provide full access only to specified directory (/home/new_user/
) which contains php-executable files which user can execute?
The user can't change directory :
ls -la /home
results in the error message "You haven't permissions"
How to provide full access only to specified directory (/home/new_user/
) which contains php-executable files which user can execute?
The user can't change directory :
ls -la /home
results in the error message "You haven't permissions"
Check out ACLs (Access Control Lists), they allow finer grained access control than the rough owner-group-others Unix model. Not all filessytems handle them, though.
You can use setfacl
command for a specific folder and user.
for user;
sudo setfacl -Rm d:u:new_user:rwx /home
for group;
sudo setfacl -Rm d:g:new_user:rwx /home
for check permissions;
getfacl /home
chmod 777
will do it (However it is over kill, that gives permission to all users). Think about who the person is logged in as (whatuser
?). Then configure it the same as if they were logged in via other means e.g. via console, or X11. It is exactly the same. – ctrl-alt-delor Feb 02 '20 at 12:04