← ../

Change mode (chmod)

Change owner (chown)

some examples :

# nobody should read this file but root
chown root:root myfile
chmod a-rwx myfile
chmod u+r myfile

# root should be allowed to read and write the filem, group admin should only be allowed to only read the file
chown root:admin myfile
chmod u=rw myfile
chmod g=r myfile
chmod o= myfile

# all files created in this directory will have admin group, root and admin can read the files, others have no rights
chown root:admin myfile
chmod 2440 mydir

# others should be allowed to execute this file as admin, root can read and write, admin can read and execute
chown root:admin myfile
chmod a= myfile
chmod u=rw myfile
chmod g=rxs myfile
chmod o=r myfile