The chmod command we used previously changes the access mode into a file.
It is used to change the permission for the owner and other users to read,
modify or execute the file. For example, if
ls -l
displays
1 userid cs241 82 Jun 30 17:11 temp
r 1 userid cs241 304 Jul 14 10:48 first
xx 2 userid cs241 4096 May 15 17:23 labs
then the information about the files and their permissions is in the first column.
Each line of the first column starts either with '' or ''. '' means that the file is a directory, '' denotes a regular file.
The next three characters describe the permission to the owner of the file.
'' means file is readable, '' file can be modified (i.e. it is writable),
'', file is executable.
Symbol '' instead of '' means that the user has no permission
to execute the file, similarly for reading and modifying.
The next three characters, starting from fifth position,
give the permission to a group including the owner.
Membership of userid in the group cs241 is specified in columns
three and four of the list.
The last three characters of each line in column one describe
the permission to all other users.
For example to allow others to read your first script use:
chmod or first
To remove that permission type:
chmod or first.