Page tree

Versions Compared

Key

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

...

Code Block
languagebash
mkdir web
#next set the permissions
chmod u+rwX,g+r-w+X,o-rw+Xrwx web
#now set www-data for the acl
setfacl -Rm g:www-data:rX ./web/
setfacl -Rm g:staff:rX ./web/

...

Code Block
languagebash
getfacl --access ./web/ | sudo setfacl -d -RM - ./web/
chmod o-rw+X web

getfacl --access =  retrieves the ACL the permissions applied to the directory only (default permissions are not returned). The details are then piped to setfacl and the parameters read,

...

Code Block
languagebash
chmod o-rwxrw+X php
#next apply this change to default
getfacl --access ./php/ | sudo setfacl -d -RM - ./php/
#check the permissions
getfacl php
# file: php
# owner: serveradmin
# 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::---

...