SlideShare a Scribd company logo
7
Most read
11
Most read
12
Most read
Linux System Administration
Permissions
Goal
Understand the following:
 The Linux / Unix security model
 How a program is allowed to run
 Where user and group information is
stored
 Details of file permissions
Users and Groups
Linux understands Users and Groups
A user can belong to several groups
A file can belong to only one user and one
group at a time
A particular user, the superuser “root” has extra
privileges (uid = “0” in /etc/passwd)
Only root can change the ownership of a file
Users and Groups cont.
User information in /etc/passwd
Password info is in /etc/shadow
Group information is in /etc/group
/etc/passwd and /etc/group divide data
fields using “:”
/etc/passwd:
joeuser:x:1000:1000:Joe User,,,:/home/joeuser:/bin/bash
/etc/group:
joeuser:x:1000:
A program runs...
A program may be run by a user, when the
system starts or by another process.
Before the program can execute the kernel
inspects several things:
• Is the file containing the program accessible to the user
or group of the process that wants to run it?
• Does the file containing the program permit execution
by that user or group (or anybody)?
• In most cases, while executing, a program inherits the
privileges of the user/process who started it.
A program in detail
When we type:
ls -l /usr/bin/top
We'll see:
-rwxr-xr-x 1 root root 68524 2011-12-19 07:18 /usr/bin/top
What does all this mean?
-r-xr-xr-x 1 root root 68524 2011-12-19 07:18 /usr/bin/top
---------- --- ------- ------- -------- ------------ -------------
| | | | | | |
| | | | | | File Name
| | | | | |
| | | | | +--- Modification Time/Date
| | | | |
| | | | +------------- Size (in bytes
| | | |
| | | +----------------------- Group
| | |
| | +-------------------------------- Owner
| |
| +-------------------------------------- “link count”
|
+---------------------------------------------- File Permissions
Group
The name of the group that has permissions in addition to the file's owner.
Owner
The name of the user who owns the file.
File Permissions
The first character is the type of file. A "-" indicates a regular (ordinary) file. A "d”
indicate a directory. Second set of 3 characters represent the read, write, and execution
rights of the file's owner. Next 3 represent the rights of the file's group, and the final
3 represent the rights granted to everybody else.
(Example modified from http://www.linuxcommand.org/lts0030.php)
Access rights
Files are owned by a user and a group
(ownership)
Files have permissions for the user, the group,
and other
“other” permission is often referred to as “world”
The permissions are Read, Write and Execute
(R, W, X)
The user who owns a file is always allowed to
change its permissions
Some special cases
When looking at the output from “ls -l” in the
first column you might see:
d = directory
- = regular file
l = symbolic link
s = Unix domain socket
p = named pipe
c = character device file
b = block device file
Some special cases cont
In the Owner, Group and other columns you
might see:
s = setuid [when in Owner column]
s = setgid [when in Group column]
t = sticky bit [when at end]
Some References
http://www.tuxfiles.org/linuxhelp/filepermissions.html
http://www.cs.uregina.ca/Links/class-info/330/Linux/linux.html
http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html
There are two ways to set permissions when
using the chmod command:
Symbolic mode:
testfile has permissions of -r--r--r--
U G O*
$ chmod g+x testfile ==> -r--r-xr--
$ chmod u+wx testfile ==> -rwxr-xr--
$ chmod ug-x testfile ==> -rw--r--r--
U=user, G=group, O=other (world)
File permissions
Absolute mode:
We use octal (base eight) values represented like this:
Letter Permission Value
R read 4
W write 2
X execute 1
- none 0
For each column, User, Group or Other you can set
values from 0 to 7. Here is what each means:
0= --- 1= --x 2= -w- 3= -wx
4= r-- 5= r-x 6= rw- 7= rwx
File permissions cont.
Numeric mode cont:
Example index.html file with typical permission values:
$ chmod 755 index.html
$ ls -l index.html
-rwxr-xr-x 1 root wheel 0 May 24 06:20 index.html
$ chmod 644 index.html
$ ls -l index.html
-rw-r--r-- 1 root wheel 0 May 24 06:20 index.html
File permissions cont.
Two critical points:
1.The permissions of a directory affect whether
someone can see its contents or add or
remove files in it.
2.The permissions on a file determine what a
user can do to the data in the file.
Example:
If you don't have write permission for a directory, then
you can't delete a file in the directory. If you have write
access to the file you can update the data in the file.
Inherited permissions
To reinforce these concepts let's do some
exercises.
Conclusion
Thank you
Sreenatha Reddy K R
krsreenatha@gmail.com

More Related Content

PPSX
User Administration in Linux
PPTX
User management
PPT
Samba server
PDF
Red Team Methodology - A Naked Look
PPTX
Users and groups
PPTX
Linux User Management
PPTX
Filepermissions in linux
DOCX
Linux admin interview questions
User Administration in Linux
User management
Samba server
Red Team Methodology - A Naked Look
Users and groups
Linux User Management
Filepermissions in linux
Linux admin interview questions

What's hot (20)

PDF
An Introduction To Linux
PPTX
User and groups administrator
PDF
Course 102: Lecture 26: FileSystems in Linux (Part 1)
PDF
Basic linux commands
PDF
Sticky bit suid sgid
PDF
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
PPT
PPT
User administration concepts and mechanisms
PDF
Course 102: Lecture 5: File Handling Internals
ODT
RHCE FINAL Questions and Answers
PDF
Linux: LVM
PPTX
Introduction to Linux
PPTX
File permission in linux
PDF
Linux Presentation
PDF
Automation with ansible
PPTX
Linux privilege escalation 101
PPTX
Linux basics
PDF
Linux introduction
PDF
Linux systems - Linux Commands and Shell Scripting
PPTX
Iptables the Linux Firewall
An Introduction To Linux
User and groups administrator
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Basic linux commands
Sticky bit suid sgid
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
User administration concepts and mechanisms
Course 102: Lecture 5: File Handling Internals
RHCE FINAL Questions and Answers
Linux: LVM
Introduction to Linux
File permission in linux
Linux Presentation
Automation with ansible
Linux privilege escalation 101
Linux basics
Linux introduction
Linux systems - Linux Commands and Shell Scripting
Iptables the Linux Firewall
Ad

Viewers also liked (20)

PDF
Unit 5 access control,rootly powers & controlling processes
PPT
101 4.7 find system files and place files in the correct location
PPTX
First sundayoflent2017
PPTX
Presentation on rhce
PPT
Effects of Physicochemical properties on biological activities
PPTX
Introduction to tcp ip linux networking
PPT
Access Control List 1
PPTX
Презентация для 8 марта. Не благодарите!
PDF
Sociedades de la información (mitos)
PPT
Linux commands and file structure
PDF
Linux System Administration Crash Course
PPTX
UADIGITALS 2017 VRK
PPTX
Archivo pdf
PPTX
Características
PPTX
Crossed immunoelectrophoresis
PPT
Cisco ACL
PDF
Access Control List & its Types
PPTX
Linux booting process - Linux System Administration
PDF
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
PPTX
Presentación características
Unit 5 access control,rootly powers & controlling processes
101 4.7 find system files and place files in the correct location
First sundayoflent2017
Presentation on rhce
Effects of Physicochemical properties on biological activities
Introduction to tcp ip linux networking
Access Control List 1
Презентация для 8 марта. Не благодарите!
Sociedades de la información (mitos)
Linux commands and file structure
Linux System Administration Crash Course
UADIGITALS 2017 VRK
Archivo pdf
Características
Crossed immunoelectrophoresis
Cisco ACL
Access Control List & its Types
Linux booting process - Linux System Administration
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
Presentación características
Ad

Similar to Access control list acl - permissions in linux (20)

PPTX
permissions.pptx computer science and tec
PDF
4_Users_and_File_Permission_and_Directory_Commands
PPT
Unix Administration 3
PPT
04-1-Linux.ppt
PDF
Basics of Linux
PDF
Devops for beginners
PPT
Basic Linux
PPT
Lession1 Linux Preview
PPTX
Licão 04 permissions
PPT
Unix/Linux Basic Commands and Shell Script
PPT
Host security
PPT
Host security
PPTX
Topic 3-1_More_Linux_Commands.pptx
PDF
Linux Security
PPT
06 users groups_and_permissions
PPT
101 4.5 manage file permissions and ownership v3
PDF
Linux Fundamentals and how to use linux.pdf
PPT
4.5 manage file permissions and ownership v3
PPTX
Chapter 3 LectureChapter 3 LectureChapter 3 Lecture.pptx
permissions.pptx computer science and tec
4_Users_and_File_Permission_and_Directory_Commands
Unix Administration 3
04-1-Linux.ppt
Basics of Linux
Devops for beginners
Basic Linux
Lession1 Linux Preview
Licão 04 permissions
Unix/Linux Basic Commands and Shell Script
Host security
Host security
Topic 3-1_More_Linux_Commands.pptx
Linux Security
06 users groups_and_permissions
101 4.5 manage file permissions and ownership v3
Linux Fundamentals and how to use linux.pdf
4.5 manage file permissions and ownership v3
Chapter 3 LectureChapter 3 LectureChapter 3 Lecture.pptx

More from Sreenatha Reddy K R (7)

PPTX
Data science applications and usecases
PPT
Linux security firewall and SELinux
PPT
Mail server setup
PPT
Linux System Administration - Web Server and squid setup
PPTX
Linux System Administration - NFS Server
PPTX
Linux System Administration - DNS
PPTX
DHCP and NIS
Data science applications and usecases
Linux security firewall and SELinux
Mail server setup
Linux System Administration - Web Server and squid setup
Linux System Administration - NFS Server
Linux System Administration - DNS
DHCP and NIS

Recently uploaded (20)

PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
assetexplorer- product-overview - presentation
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
history of c programming in notes for students .pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Cost to Outsource Software Development in 2025
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
medical staffing services at VALiNTRY
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
assetexplorer- product-overview - presentation
Reimagine Home Health with the Power of Agentic AI​
history of c programming in notes for students .pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Cost to Outsource Software Development in 2025
L1 - Introduction to python Backend.pptx
Patient Appointment Booking in Odoo with online payment
wealthsignaloriginal-com-DS-text-... (1).pdf
Oracle Fusion HCM Cloud Demo for Beginners
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Odoo Companies in India – Driving Business Transformation.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
medical staffing services at VALiNTRY
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Operating system designcfffgfgggggggvggggggggg
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Why Generative AI is the Future of Content, Code & Creativity?
Advanced SystemCare Ultimate Crack + Portable (2025)

Access control list acl - permissions in linux

  • 2. Goal Understand the following:  The Linux / Unix security model  How a program is allowed to run  Where user and group information is stored  Details of file permissions
  • 3. Users and Groups Linux understands Users and Groups A user can belong to several groups A file can belong to only one user and one group at a time A particular user, the superuser “root” has extra privileges (uid = “0” in /etc/passwd) Only root can change the ownership of a file
  • 4. Users and Groups cont. User information in /etc/passwd Password info is in /etc/shadow Group information is in /etc/group /etc/passwd and /etc/group divide data fields using “:” /etc/passwd: joeuser:x:1000:1000:Joe User,,,:/home/joeuser:/bin/bash /etc/group: joeuser:x:1000:
  • 5. A program runs... A program may be run by a user, when the system starts or by another process. Before the program can execute the kernel inspects several things: • Is the file containing the program accessible to the user or group of the process that wants to run it? • Does the file containing the program permit execution by that user or group (or anybody)? • In most cases, while executing, a program inherits the privileges of the user/process who started it.
  • 6. A program in detail When we type: ls -l /usr/bin/top We'll see: -rwxr-xr-x 1 root root 68524 2011-12-19 07:18 /usr/bin/top What does all this mean?
  • 7. -r-xr-xr-x 1 root root 68524 2011-12-19 07:18 /usr/bin/top ---------- --- ------- ------- -------- ------------ ------------- | | | | | | | | | | | | | File Name | | | | | | | | | | | +--- Modification Time/Date | | | | | | | | | +------------- Size (in bytes | | | | | | | +----------------------- Group | | | | | +-------------------------------- Owner | | | +-------------------------------------- “link count” | +---------------------------------------------- File Permissions Group The name of the group that has permissions in addition to the file's owner. Owner The name of the user who owns the file. File Permissions The first character is the type of file. A "-" indicates a regular (ordinary) file. A "d” indicate a directory. Second set of 3 characters represent the read, write, and execution rights of the file's owner. Next 3 represent the rights of the file's group, and the final 3 represent the rights granted to everybody else. (Example modified from http://www.linuxcommand.org/lts0030.php)
  • 8. Access rights Files are owned by a user and a group (ownership) Files have permissions for the user, the group, and other “other” permission is often referred to as “world” The permissions are Read, Write and Execute (R, W, X) The user who owns a file is always allowed to change its permissions
  • 9. Some special cases When looking at the output from “ls -l” in the first column you might see: d = directory - = regular file l = symbolic link s = Unix domain socket p = named pipe c = character device file b = block device file
  • 10. Some special cases cont In the Owner, Group and other columns you might see: s = setuid [when in Owner column] s = setgid [when in Group column] t = sticky bit [when at end] Some References http://www.tuxfiles.org/linuxhelp/filepermissions.html http://www.cs.uregina.ca/Links/class-info/330/Linux/linux.html http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html
  • 11. There are two ways to set permissions when using the chmod command: Symbolic mode: testfile has permissions of -r--r--r-- U G O* $ chmod g+x testfile ==> -r--r-xr-- $ chmod u+wx testfile ==> -rwxr-xr-- $ chmod ug-x testfile ==> -rw--r--r-- U=user, G=group, O=other (world) File permissions
  • 12. Absolute mode: We use octal (base eight) values represented like this: Letter Permission Value R read 4 W write 2 X execute 1 - none 0 For each column, User, Group or Other you can set values from 0 to 7. Here is what each means: 0= --- 1= --x 2= -w- 3= -wx 4= r-- 5= r-x 6= rw- 7= rwx File permissions cont.
  • 13. Numeric mode cont: Example index.html file with typical permission values: $ chmod 755 index.html $ ls -l index.html -rwxr-xr-x 1 root wheel 0 May 24 06:20 index.html $ chmod 644 index.html $ ls -l index.html -rw-r--r-- 1 root wheel 0 May 24 06:20 index.html File permissions cont.
  • 14. Two critical points: 1.The permissions of a directory affect whether someone can see its contents or add or remove files in it. 2.The permissions on a file determine what a user can do to the data in the file. Example: If you don't have write permission for a directory, then you can't delete a file in the directory. If you have write access to the file you can update the data in the file. Inherited permissions
  • 15. To reinforce these concepts let's do some exercises. Conclusion Thank you Sreenatha Reddy K R [email protected]

Editor's Notes