To change a file's permissions to a specific value, use this command:
chmod who=value file...where who specifies the type of user that these permissions apply to:
uto change the owner's (``user's'') permissions;
gto change group permissions;
oto change world (``other'') permissions; or
ato change all permissions: owner, group and world.
rfor read permission;
wfor write permission; and
xfor execute permission.
privateso only the user can read and write it:
% chmod u=rw private
barso anyone can read it, but no one can write or execute it:
% chmod a=r public.html
When you create a web site, each directory must have the permissions as below:
drwxr-xr-x mort admin 4096 Jul 3 21:49 public_html
Any files must have permissions as in this example:
-rw-r--r-- 1 mort admin 5046 Jun 13 17:01 index.html
If you transfer files via ftp to your website on the server, they should automatically have the correct permissions.