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

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

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

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.