[BlueOnyx:18101] Re: website /web permissions configuration

Michael Stauber mstauber at blueonyx.it
Fri Jul 24 18:13:38 -05 2015


Hi Tom,

> I just noticed on a couple of virtual sites that the permissions are set to 
> 644 and 755 admin. So I am able to FTP into the site with the site/admin 
> username and password, but cannot upload any modified files. I checked the 
> sites that are correct and found the following. the /web directory is 
> 775 "nobody". The directories under /web that were created by the site 
> admin are 755 "site admin name" and the files are 644 "site admin name".
> 
> So what I would like to do is chmod the 2 sites that are incorrectly set to 
> what it should be.

Lets say its /home/sites/www.test.com/web, the group is "site5" and the
siteAdmin who should own all files under /web is "site5_admin":

In that case:

chmod 02775 /home/sites/www.test.com/web
chown -R site5_admin:site5 /home/sites/www.test.com/web
chown nobody:site5 /home/sites/www.test.com/web

That will do it.

The "chmod 02775 web" sets the permissions on /web to the correct
"drwxrwsr-x" flags. Which equals the octal 42775 permissions we need.
chmod itself doesn't take "42775", so we use "02775" on the command line
to achieve the same result.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list