Systems administration & maintenance - File Permissions.pptx
wgdereje1
2 views
21 slides
Sep 16, 2025
Slide 1 of 21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
About This Presentation
SysAd
Size: 1.01 MB
Language: en
Added: Sep 16, 2025
Slides: 21 pages
Slide Content
Systems administration & maintenance class Lesson 8 – File Permissions
Permissions on Files Denoted by a letter A permission represents an action that can be done on the file Occasionally referred as permission bits Note that for script you need both Execute and Read permission
Permissions on Directories r, w and x has also meaning for directories The meanings for directories is slightly different Read r – permission to get a listing of the directory Write w – permission to create, delete, or rename files within the directory Execute x – permission to change to the directory, or to use the directory as an intermediate part of the path of a file.
Examining Permissions The ls –l command allows you to look at the permissions of a file.
Preserving Permissions By default the cp command makes no attempt to preserve permissions -p to preserve permissions and timepstamp
How Permissions apply If you own a file, the per-owner permission apply to you Otherwise if you are in the group that owns the file, the per-group permissions apply to you
Listing Directory Contents ls Compact listing on non-hidden files ls -a Compact listing of ALL files ls -l Detailed listing of non-hidden files ls -F Displays symbols to mark directories and executable files ls - ld Detailed listing of specified directory ls -i Displays i-node number ( I.d. number of files)
Access Permissions Limiting unauthorized access to your directories and files is a very important concern for ALL Linux (Unix) users. Consequences of Unauthorized Access: Copying your assignments (cheating) Using your account for illegal activity Using your account to send obscene messages Tampering with files
File / Directory Permissions The Linux (Unix) OS can allow the user to specify read , write and execute permissions to the user , group or all others (UGO) for files. A user can also specify read , write and execute permissions for a directory. The execute permission for a directory allows the person to view files in that directory
chmod Command (Relative Method) Used to change the access permissions of a file or directory Format: chmod [option] [who] [operation] [permission] file chmod [option] [permission] file-list who relates to user ( u ) , group ( g ) or all others ( o ) operation relates to adding ( + ), removing ( - ) or setting ( = ) permissions permissions are read ( r ), write ( w ) and execute ( x )
chmod Command (Relative Method) Examples: Add Permission chmod g+rw file.name chmod o+x file.name Remove Permission chmod g-w file.name chmod a-w file.name (removes write for ugo) Set Permission chmod o=rx file.name chmod go=rx filename Note: you can use wildcard symbols (eg *) to match particular files
File Access Rights Types of Users: Owner Group All/Other Types of Permissions: Read Write Execute Types of Files Directories Other files
Table 8.1 Summary of File Permissions in LINUX
Directory Permissions read = list files in the directory write = add new files to the directory execute = access files in the directory
Determining File Access Rights
Table 8.2 Permission Values
Table 8.3 Permissions for Access to courses, labs, and temp
Changing the Access Rights Purpose – to set/change permissions in files chmod [options] octal-mode filelist chmod [options] symbolic-mode filelist Options -R recursively process subdirectories
Table 8.4 Values for Symbolic Mode Components
Table 8.5 Examples of the chmod Commands and Their Purposes
Table 8.5 Examples of the chmod Commands and Their Purposes