Using Access Contol List (ACL) to veiw and set files and folder permission

Access Control List (ACL) provides flexible permission mechanism for file systems.

To view ACL permission of folder (say views folder), use getfacl

getfacl views

Use setfacl to set permission for a files and folder that will be created in future

sudo setfacl -R -m default:u::rwx,default:g::rwx,default:o::r-x views/

 * Note :: 
 * -R recursive set permission of directories and file
 * -m modify the permission all the files and folder in future to rwxrwxr-x

Once above command, any files and folders created inside views will have following permission:

drwxrwxr-x views