Jump to content

Need help setting up linux permissions for web server

I have a linux server running litespeed webserver. The server will be shared between 3 people. Each person will have at least one website.

I have setup a virtual hosts under home directory of each user. However I can't figure out how to setup permission so that only owners access&edit and server can access those files for execution.

 

Will it be sufficient to apply "rwe --- --e" for user directory with -R ?

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

You can try the below:

 

find . -type d -exec chmod 750 {} \;
find . -type f -exec chmod 640 {} \;

 

This will set all folders to owner (read/write/execute), group (read/execute), others (no access) and files to owner (read/write), group (read), others (no access). I would also suggest, you put each user in their own group (just make a group to match their user name) and add them as members of the webservers group. that way, the web server should still have access, and each user can't see the others files!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×