Adfaft

User

Filesystem

System

Port

Process

CHMOD & FACL

Chmod recursively

// recursively 755 and 664
chmod -R a=,a+rX,u+w,g+w /some/path/here

Step 1: Create Backup

First make a backup incase anything goes wrong someday:

mkdir ~/storage-changes
sudo getfacl -R /var/www > ~/storage-changes/default_www_facl

(Incase) To Restore

sudo setfacl --restore=~/storage-changes/default_www_facl 

Apply ACL

Next, apply to a group:

# -R is recursive
# -m is modify
# -d applies to default ACL

sudo chgrp -R www-data /var/www
sudo setfacl -Rd g:www-data:rwX /var/www
sudo setfacl -Rdm g:www-data:rwX /var/www

ls -lta /var
sudo getfacl /var/www

The + at the end of the file/dir listing only means it has additional ACLs.

MISC

Create New File via Right Click

mkdir ~/Templates
touch ~/Templates/Text\ File.txt

Diff