cd ~/it244/ex
mkdir ex10
cd ex10
passwd program
which passwd
ls -l /usr/bin/passwd
Notice that the execute column for user (owner) has an s in the execute column
and that the owner is root.
ls -l /etc/passwd
Notice that while everyone can read this file, only the owner, root, can modify it.
passwd command has setuid enabled,
anyone who runs this command has the access permissions that root has.
cd ~tsoro/course_files/it244_files/dir_permissions
pwd
ls -l
ls -l dir1
You have read permission for this directory, so you can
run ls on it.
cd dir1
You have execute permission so you can enter the directory.
pwd
touch YOUR_UNIX_USERNAME
Where you replace YOUR_UNIX_USERNAME with your unix username
ls -l
Since you have write permissions to this directory, you can create a file in
it. Notice that you are the owner of this newly created file.
cd ..
pwd
ls -ld dir2
Running ls -l on dir2 gives you a long listing of the
contents of dir2.
ls -l dir2
You have read permission, so you can do this.
cd dir2
You can enter this directory because you have execute permission on it.
pwd
touch YOUR_UNIX_USERNAME
This command fails because you do not have write permission
for this directory.
cd ..
pwd
ls -ld dir3
ls dir3
You can do this because you have read permission on dir3.
cd into this directory
cd dir3
This command fails because you do not have execute permission on dir3.
touch dir3/YOUR_UNIX_USERNAME
This command fails because you do not have write permission
on dir3.
ls -ld dir4
ls dir4
This command fails because you do not have read permission on dir4.
cd dir4
This command succeeds because you have execute permission on dir4.
pwd
ls
Again the command fails because you do not have read permission.
touch YOUR_UNIX_USERNAME
This command fails because you do not have write permission
for this directory.
cd
pwd
ln -s it244/ex/ex10 ex10
ls -l
Notice that you have at least two links in your home directory, the it244 link
that was created when you applied successfully for this course, and the one
you just created.
cd ex10
pwd
pwd -P
What you think of as your it244 directory is really
a link to a directory, named after you Unix ID, in the /courses/it244/s13/tsoro/ directory.
cd ..
pwd
Notice that you jumped back to your it244 directory, ignoring the
fact that your ex10 directory was inside your ex driectory.
cd
rm ex10This will allow me to test your script.
cd ~/it244/ex/ex10
pwd
nano ex10.sh
~tsoro/it244_test/ex10.sh