Jump to content

File permissions vs File ownership


Recommended Posts

Hello,

 

I have two questions:

 

1. What folders (files) have to be writeable by the web-server after the installation (I gues there will be less folders requiring write access than during the installation process)?

 

2. What is better:

to give the ownership of these folders/files to the web-server (f.x. user www-data) and keep the permission RWXR-XR-X (755)...

OR ...

to keep the ownership to a different user (ex John) but give the folders the permission RWXRWXRWX (777)? ...

OR ...

a combination: keep all folders to a different user with no write access except the folders that need write access that I give their ownership to the web-server and allow only the web-server to write to them.

 

Thank you

Radu Dudici

 

Link to comment
Share on other sites

Thank you both (El Patron and Benjamin) ... this is also what I was thinking about. Now I have a second oppinion on it.

 

Just one note ... when you refer to "the ownership should be your domain" I understand that the owner should be the user the web-server (Ex Apache web server on Linux) runs as (ex www-data). Is this correct?

 

Regards

Radu

Link to comment
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
×
×
  • Create New...