Let's take a moment to discuss permissions. The UNIX command chmod changes the file-access permissions on a given file or files, or on the contents of an entire subdirectory. Only the owner of the file or a privilaged user can change the mode of a file. There are two ways to change permissions: through symbolic or numeric. I will show you numeric. To get the current permissions, use ls -al on your directory. There are three sets of letters drwxrwxrwx. The d just stands for directory. The next set of letters mean:
Follow the table below.
octal arabic UNIX permission 000 0 --- 001 1 --x 010 2 -w- 011 3 -wx 100 4 r-- 101 5 r-x 110 6 rw- 111 7 rwx
A number 400 means the owner has read permission. The 400 permission looks like: -r--------. A 423 means that you, the user can read the file, users in your group can write to the file and the rest of the world can write and execute the file. The 423 permission looks like: -r---w--wx. A 777 permission appears as: -rwxrwxrwx, and a 000 permission appears as: ----------.
Remember that there are three sets to a permission, owner, group, user. Follow the list above if you run into trouble changing permissions. What you need to do is change the permissions on the . and .. directories so the rest of the world will be able to view your home page. To do this follow the syntax below and type this at the terminal.
cd ~/public_html chmod 711 .whenever a new file is created, you will need to update your permissions on that file for these files, use this syntax below. Remember that the permissions on the directories must be 711.chmod 711 ..
Let's move on.
Go back to Chapter 2.
Go back to the Main Screen.
chmod 744 filename
Go to Chapter 4.