drwxr-xr-x 2 reid instrs 4096 Jan 16 09:25 test/
(a) Which regular files can be read by everyone?
A regular
a file that contains data
student listtxt Syscalls
file is simply
An executable file is a regularfile
Syscalls.c
A text file is a regularsite
A directoryisnot a regularfile
(b) Circle the names of directories.
(c) Circle the size of the smallest regular file.
(d) Underline the names of the executable files.
CSC209H Worksheet: File Permissions
1. Consider the following listing of files as produced by ls -lF:
-rwx—— 1 reid instrs 418 Jan 16 09:23 day.txt*
-rw——- 1 reid instrs 13473 Jan 16 09:23 e1.pdf
drwxr-xr-x 2 reid instrs 4096 Jan 16 09:23 emptydir/
-rw-rw-rw- 1 reid instrs 835 Jan 16 09:23 student_list.txt
-rwxr-xr-x 1 reid instrs 9742 Jan 16 09:23 syscalls*
-rw-r–r– 1 reid instrs 197 Jan 16 09:23 syscalls.c
O
O
(e) Give the command to remove read permission for others (not in the group) from all the files (including the directories) without changing any other permissions.
chmod o r
other T T T wildcard
takeaway matchon all currentworking
filesin the directory
(f) Suppose you have a new file new_file and you don¡¯t know the permission. What is the command to set
the file to be readable and writeable by the owner, readable by the group and not accessible at all to anyone
else?
Chmod newfile 696400
So ru
I 10
r x 6 I01
Each of r
is group permissionsettings
5
representedby3bits or
r w x i i 1
one octal (g) Showthechanges
7 To0 4
on the listing that would result from running the command chmod 751 student_list.txt
d
dir
e
ctl
t
i
g
i
y
7 7 111 ray
101 rx
5
I70017 x
The new permissions would be rwxr x x