Page tree

Versions Compared

Key

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

...

Code Block
languagebash
sudo /home/
# Normal permissions
sudo chown -R svradm:svradm ./www.dailyplanet.com/
sudo chmod -R o-rwx ./www.dailyplanet.com/
# ACL permissions
sudo setfacl -Rm g:wgdailyplanet:rwx ./www.dailyplanet.com/ # not right, putting execute on files
sudo setfacl -Rm g:www-data:r ./www.dailyplanet.com/ # not quite right, need execute on directories only
sudo setfacl -Rm g:staff:r ./www.dailyplanet.com/

...

getfacl --access generates the details of the permissions we applied to the directory and the setfacl with the following parameters,

-d and -M parameters changes the default ACL for new files and directories. The R flag esures the changes are applied recursively to folders and files.

Info

Notice the dash after -M which takes as a parameter file. If the file is -, the input is taken from stdin.

= Change default permissions for newly created files and folder.
-M = Take as input files. Because the dash is used, the file is instead standard input.
R  = Apply changes recursively to folders and files.

Repeat the same steps for www.lexcorp.com and change the group accordingly,

...