Jump to content

It:setfacl

From ChemWiki

sudo su - (as special user, eg rzepa)

setfacl -R -d -m u:user1:rwx,u:user2:rwx /var/www/html/<somefolder> (folder only)

setfacl -R -d -m u:rzepa:rwx /var/www/html/rzepa/blog/wp-content/uploads/2015/06

setfacl -R -d -m u:user1:r /var/www/html/<somefolder> (folder only, to remove write and execute privs)

setfacl -R -m u:user1:rwx,u:user2:rwx /var/www/html/<somefolder> (files in folder)

getfacl <somefolder> allows you to see the acl for a file

To loosen up permissions for upgrade use:

sudo chown -R apache:webmaster /var/www/html/rzepa/blog/wp-content

To tighten them up use:

sudo chown -R rzepa:webmaster /var/www/html/rzepa/blog

sudo chown -R apache:webmaster /var/www/html/rzepa/blog/wp-content/uploads

/usr/local/bin/wpsetperms --lock or --unlock