Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
cd php
mkdir dailyplanet.com lexcorp.com tmp logs
#change the php folder permissions back to the way it was
cd ..
chmod o-rw+X php
#check the permissions 
getfacl php
# file: php
# owner: rfongyee
# group: staff
user::rwx
group::r-x
group:www-data:r-x
group:staff:r-x
mask::r-x
other::--x
default:user::rwx
default:group::r-x
default:group:www-data:r-x
default:group:staff:r-x
default:mask::r-x
default:other::---

Now to add the necessary groups to their respective virtual hosts

Code Block
languagebash
cd php
setfacl -Rm g:wgdailyplanet:rwX dailyplanet.com
getfacl --access ./dailyplanet.com/ | sudo setfacl -d -RM - ./dailyplanet.com/
cd dailyplanet.com
mkdir www

Now do the same to lexcorp.com

Setting Permissions for tmp and logs

Code Block
languagebash
cd php
setfacl -Rm g:www-data:rwX tmp
getfacl --access ./tmp/ | sudo setfacl -d -RM - ./tmp/
setfacl -Rm g:www-data:rwX logs
getfacl --access ./logs/ | sudo setfacl -d -RM - ./logs/

Now to add the necessary groups to their respective virtual hosts

Code Block
languagebash
cd php
setfacl -Rm g:wgdailyplanet:rwX dailyplanet.com
getfacl --access ./dailyplanet.com/ | sudo setfacl -d -RM - ./dailyplanet.com/
cd dailyplanet.com
mkdir www blog

Now do the same to lexcorp.com

 

Next move the web folder to the opt directory and make serveradmin:staff own it

...