Configuring Unix / Linux File and Directory Access Rights
Below are some other examples of how to use the chmod command:
>> full access for everybody:
chmod 777 filename
>> full access for owner and group privileges but other users can only read and execute:
chmod 775 filename
>> full access for owner, but restricting group and other user privileges to only read and execute for files in the directory:
chmod 755 dirname
>> full access for the owner with no access rights or privileges for anyone else:
chmod 700 filename
chmod 700 -r /path/to/folder
>> no access to files in directory for group or other users and owner restricted to read and execute privileges to prevent the accidental deletion or modification of
files in the directory:
chmod 500 dirname
>> allowing the owner and group read and write access to a file, allowing others in the group to edit or delete the file as well as the owner, but with no access for
other users:
chmod 660 filename
===============================