cd ~/it244/ex
mkdir ex10
cd ex10
passwd
programwhich passwd
ls -l /usr/bin/passwdNotice that the execute column for user (owner) has an s in the execute column and that the owner is root.
ls -l /etc/passwdNotice 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 ~ghoffman/course_files/it244_files/dir_permissions
pwd
ls -l
ls -l dir1You have read permission for this directory, so you can run
ls
on it.
cd dir1You have execute permission so you can enter the directory.
pwd
touch YOUR_UNIX_USERNAMEWhere you replace YOUR_UNIX_USERNAME with your Unix username
ls -lSince you have write permissions to this directory, you can create a file in it.
cd ..
pwd
ls -ld dir2Running
ls -l
on dir2 gives you a long listing of the
contents of dir2.
ls -l dir2You have read permission, so you can do this.
cd dir2You can enter this directory because you have execute permission on it.
pwd
touch YOUR_UNIX_USERNAMEThis command fails because you do not have write permission for this directory.
cd ..
pwd
ls -ld dir3
ls dir3You can do this because you have read permission on dir3.
cd
into this directorycd dir3This command fails because you do not have execute permission on dir3.
touch dir3/YOUR_UNIX_USERNAMEThis command fails because you do not have write permission on dir3.
ls -ld dir4
ls dir4This command fails because you do not have read permission on dir4.
cd dir4This command succeeds because you have execute permission on dir4.
pwd
lsAgain the command fails because you do not have read permission.
touch YOUR_UNIX_USERNAMEThis command fails because you do not have write permission for this directory.
cd
pwd
ln -s it244/ex/ex10 ex10
ls -lNotice 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 -PWhat you think of as your it244 directory is really a link to a directory, named after you Unix ID, in the /courses/it244/s19/ghoffman/ directory.
cd ..
pwdNotice 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
~ghoffman/it244_test/ex10.sh