The command chmod changes the mode of the file. such that no one in
the group (the students) or others have any access to the cs125 directory.
You can check the permissions using the ls command as shown below.
ls -ld cs125
The output of the ls command should be similar to what is shown below.
drwx------ 4 amit faculty
1024 Sep 22 11:46 cs125
For more details on how directory and file permissions work, please
check the section on File protection in the local Linux guide.
Now check the permissions of your home directory with the ls commands
as follows.
ls -ld ~
The output should be similar to the following:
drwxr-xr-x 53 amit faculty
4096 Oct 1 10:37 /home/amit cd ~
The output for the ls command should be similar to what is shown below.
drwxr-xr-x 11 amit faculty
4096 Sep 29 10:20 public_html/
The public_html directory is the only directory that will be
visible to anyone browsing your home page.
To prepare your home directory for access by a Web
server in the lab, you will need to modify the security for your
home directory and create a couple of folders.
mkdir cs125
mv prog* cs125
chmod g-rwx,o-rwx cs125
cd ~
chmod g+rx,o+rx ~
mkdir public_html
chmod g+rx,o+rx public_html
ls -ld public_html