0

Hi,

What permission should I give to var/www folder in my ubuntu?

Group: mywebusers
Users under "mywebusers" : site1-user, site2-user, site3-user

I'll have:
var/www/ -> No one should access to this main root folder
var/www/site1 -> accessible on the web (only for: site1-user)
var/www/site2 -> accessible on the web (only for: site2-user)
var/www/site3 -> accessible on the web (only for: site3-user)

No permission to world please.

Can anyone show me the correct steps please?

Thanks

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by veledrom
0

chown root /var/www
chmod 700 /var/www
chown site1-user:mywebusers /var/www/site1
chown site2-user:mywebusers /var/www/site2
chown site3-user:mywebusers /var/www/site3
chmod 700 /var/www/site2
chmod 700 /var/www/site1
chmod 700 /var/www/site3

Lets user do anything group/world cannot do anything.

Hi,
What permission should I give to var/www folder in my ubuntu?

Group: mywebusers
Users under "mywebusers" : site1-user, site2-user, site3-user

I'll have:
var/www/ -> No one should access to this main root folder
var/www/site1 -> accessible on the web (only for: site1-user)
var/www/site2 -> accessible on the web (only for: site2-user)
var/www/site3 -> accessible on the web (only for: site3-user)

No permission to world please.

Can anyone show me the correct steps please?

Thanks

0

I cannot see anything in www now. I also cannot assess from localhost. It says Forbidden.

0

I cannot see anything in www now. I also cannot assess from localhost. It says Forbidden.

try changing chmod 700 /var/www to chmod 755 itll let people view the root directory but it should open up the other directories for the indivisual users.

0

When I give 755, would it be security hole? Also no one uses this computer apart from me. It is used as web server. People just access their own site directories and read/write to it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.