SlideShare a Scribd company logo
1 of 13
UNIX
Introduction to Linux
You can have many users:
logged into a system simultaneously,
each running many programs.
It's the kernel's job to keep:
each process and user separate and
to regulate access to system hardware, including
CPU,
memory,
disk
and other I/O devices.
Directories, Files and Inodes
Introduction to Linux
• Every directory and file is listed in its parent directory.
• In the case of the root directory, that parent is itself.
• A directory is a file that contains a table listing the:
– files contained within it, giving file names to the inode numbers in the list.
• The information about all the files and directories is maintained in
INODE TABLE
• An Inode (Index Nodes) is an entry in the table containing
information about a file (metadata) including file permissions, UID,
GID, size, timestamp, pointers to files data blocks on the disk etc.
Users, Groups and Access
Permissions
Introduction to Linux
In UNIX/LINUX, there is a concept of user and an
associated group
The system determines whether or not a user or group
can access a file or program based on the permissions
assigned to them.
Apart from all the users, there is a special user called
Super User or the root which has permission to access
any file and directory
Access Permissions
Introduction to Linux
There are three permissions for any file, directory or
application program.
The following lists the symbols used to denote each,
along with a brief description:
r — Indicates that a given category of user can read a
file.
w — Indicates that a given category of user can write to
a file.
x — Indicates that a given category of user can execute
the file.
Access Permissions
Introduction to Linux
Each of the three permissions are assigned to three
defined categories of users.
The categories are:
owner — The owner of the file or
application.
group — The group that owns the file or
application.
others — All users with access to the
system.
Access Permissions
Introduction to Linux
One can easily view the permissions for a file by invoking a
long format listing using the command
ls -l
For instance, if the user Ali creates an executable file
named test, the output of the command ls -l test would
look like this:
-r w x r w x r - x 1 A l i s t u d e n t 0 S e p 2 6 1 2 : 2 5 t e s t
Access Permissions
Introduction to Linux
The permissions for this file are listed at the start of the
line, starting with rwx.
This first set of symbols define owner access.
The next set of rwx symbols define group access
The last set of symbols defining access permitted for
all other users.
Access Permissions
Introduction to Linux
This listing indicates that the file is readable, writable,
and executable by the user who owns the file (user Ali)
as well as the group owning the file (which is a group
named student).
The file is also world-readable and world-executable,
but not world-writable.
Listing the Content of a Directory
Introduction to Linux
ls is used to list the contents of a directory.
If the command ls is written with parameter –l then
the command lists contents of the working directory
with details. Example:
$ ls –l
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.
Set-user-ID
Set-user-ID
Set-user-ID(“suid”or“setuid”)bit
– On executable files, causes the program to run as
file owner regardless of who runs it
– Ignored for everything else
– In 10-character display, replaces the 4th character
(x or -) with s (or S if not also executable)
-rws r-x r-x: setuid, executable by all
-rwx r-x r-x: executable by all, but not setuid
-rwS r-- r--: setuid, but not executable - not useful

More Related Content

Similar to 04-1-Linux.ppt

chapter 3 linux-lecture.ppt
chapter 3 linux-lecture.pptchapter 3 linux-lecture.ppt
chapter 3 linux-lecture.pptanwarkade1
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.pptNikhil Raut
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)christ university
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentalsDima Gomaa
 
4_Users_and_File_Permission_and_Directory_Commands
4_Users_and_File_Permission_and_Directory_Commands4_Users_and_File_Permission_and_Directory_Commands
4_Users_and_File_Permission_and_Directory_CommandsGautam Raja
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linuxPapu Kumar
 
Unit 4 user and group
Unit 4 user and groupUnit 4 user and group
Unit 4 user and grouproot_fibo
 
File Input/output, Database Access, Data Analysis with Pandas
File Input/output, Database Access, Data Analysis with PandasFile Input/output, Database Access, Data Analysis with Pandas
File Input/output, Database Access, Data Analysis with PandasPrabu U
 
Introduction to linux day3
Introduction to linux day3Introduction to linux day3
Introduction to linux day3Gourav Varma
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linuxSreenatha Reddy K R
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to LinuxDimas Prasetyo
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals Sadia Bashir
 

Similar to 04-1-Linux.ppt (20)

chapter 3 linux-lecture.ppt
chapter 3 linux-lecture.pptchapter 3 linux-lecture.ppt
chapter 3 linux-lecture.ppt
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.ppt
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
4_Users_and_File_Permission_and_Directory_Commands
4_Users_and_File_Permission_and_Directory_Commands4_Users_and_File_Permission_and_Directory_Commands
4_Users_and_File_Permission_and_Directory_Commands
 
Host security
Host securityHost security
Host security
 
Host security
Host securityHost security
Host security
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Unit 4 user and group
Unit 4 user and groupUnit 4 user and group
Unit 4 user and group
 
File Input/output, Database Access, Data Analysis with Pandas
File Input/output, Database Access, Data Analysis with PandasFile Input/output, Database Access, Data Analysis with Pandas
File Input/output, Database Access, Data Analysis with Pandas
 
Linux administration classes in mumbai
Linux administration classes in mumbaiLinux administration classes in mumbai
Linux administration classes in mumbai
 
Introduction to linux day3
Introduction to linux day3Introduction to linux day3
Introduction to linux day3
 
prateekporwal
prateekporwalprateekporwal
prateekporwal
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
 
Ppt linux
Ppt linuxPpt linux
Ppt linux
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linux
 
Linux
LinuxLinux
Linux
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals
 

More from EidTahir

Servlets+JSP.ppt
Servlets+JSP.pptServlets+JSP.ppt
Servlets+JSP.pptEidTahir
 
servlets.ppt
servlets.pptservlets.ppt
servlets.pptEidTahir
 
005428058.pdf
005428058.pdf005428058.pdf
005428058.pdfEidTahir
 
005428055.pdf
005428055.pdf005428055.pdf
005428055.pdfEidTahir
 
2.J2EE_Overview.ppt
2.J2EE_Overview.ppt2.J2EE_Overview.ppt
2.J2EE_Overview.pptEidTahir
 
009458666.pdf
009458666.pdf009458666.pdf
009458666.pdfEidTahir
 
009921362.pdf
009921362.pdf009921362.pdf
009921362.pdfEidTahir
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdfEidTahir
 
009478419.pdf
009478419.pdf009478419.pdf
009478419.pdfEidTahir
 
009445185.pdf
009445185.pdf009445185.pdf
009445185.pdfEidTahir
 
009705432.pdf
009705432.pdf009705432.pdf
009705432.pdfEidTahir
 
009694598.pdf
009694598.pdf009694598.pdf
009694598.pdfEidTahir
 
enterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfenterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfEidTahir
 
010118565.pdf
010118565.pdf010118565.pdf
010118565.pdfEidTahir
 
005528214.pdf
005528214.pdf005528214.pdf
005528214.pdfEidTahir
 
005432796.pdf
005432796.pdf005432796.pdf
005432796.pdfEidTahir
 
009586150.pdf
009586150.pdf009586150.pdf
009586150.pdfEidTahir
 
009551323.pdf
009551323.pdf009551323.pdf
009551323.pdfEidTahir
 
009723779.pdf
009723779.pdf009723779.pdf
009723779.pdfEidTahir
 

More from EidTahir (20)

Servlets+JSP.ppt
Servlets+JSP.pptServlets+JSP.ppt
Servlets+JSP.ppt
 
servlets.ppt
servlets.pptservlets.ppt
servlets.ppt
 
005428058.pdf
005428058.pdf005428058.pdf
005428058.pdf
 
005428055.pdf
005428055.pdf005428055.pdf
005428055.pdf
 
DNS.pptx
DNS.pptxDNS.pptx
DNS.pptx
 
2.J2EE_Overview.ppt
2.J2EE_Overview.ppt2.J2EE_Overview.ppt
2.J2EE_Overview.ppt
 
009458666.pdf
009458666.pdf009458666.pdf
009458666.pdf
 
009921362.pdf
009921362.pdf009921362.pdf
009921362.pdf
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdf
 
009478419.pdf
009478419.pdf009478419.pdf
009478419.pdf
 
009445185.pdf
009445185.pdf009445185.pdf
009445185.pdf
 
009705432.pdf
009705432.pdf009705432.pdf
009705432.pdf
 
009694598.pdf
009694598.pdf009694598.pdf
009694598.pdf
 
enterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfenterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdf
 
010118565.pdf
010118565.pdf010118565.pdf
010118565.pdf
 
005528214.pdf
005528214.pdf005528214.pdf
005528214.pdf
 
005432796.pdf
005432796.pdf005432796.pdf
005432796.pdf
 
009586150.pdf
009586150.pdf009586150.pdf
009586150.pdf
 
009551323.pdf
009551323.pdf009551323.pdf
009551323.pdf
 
009723779.pdf
009723779.pdf009723779.pdf
009723779.pdf
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 

04-1-Linux.ppt

  • 1. UNIX Introduction to Linux You can have many users: logged into a system simultaneously, each running many programs. It's the kernel's job to keep: each process and user separate and to regulate access to system hardware, including CPU, memory, disk and other I/O devices.
  • 2. Directories, Files and Inodes Introduction to Linux • Every directory and file is listed in its parent directory. • In the case of the root directory, that parent is itself. • A directory is a file that contains a table listing the: – files contained within it, giving file names to the inode numbers in the list. • The information about all the files and directories is maintained in INODE TABLE • An Inode (Index Nodes) is an entry in the table containing information about a file (metadata) including file permissions, UID, GID, size, timestamp, pointers to files data blocks on the disk etc.
  • 3. Users, Groups and Access Permissions Introduction to Linux In UNIX/LINUX, there is a concept of user and an associated group The system determines whether or not a user or group can access a file or program based on the permissions assigned to them. Apart from all the users, there is a special user called Super User or the root which has permission to access any file and directory
  • 4. Access Permissions Introduction to Linux There are three permissions for any file, directory or application program. The following lists the symbols used to denote each, along with a brief description: r — Indicates that a given category of user can read a file. w — Indicates that a given category of user can write to a file. x — Indicates that a given category of user can execute the file.
  • 5. Access Permissions Introduction to Linux Each of the three permissions are assigned to three defined categories of users. The categories are: owner — The owner of the file or application. group — The group that owns the file or application. others — All users with access to the system.
  • 6. Access Permissions Introduction to Linux One can easily view the permissions for a file by invoking a long format listing using the command ls -l For instance, if the user Ali creates an executable file named test, the output of the command ls -l test would look like this: -r w x r w x r - x 1 A l i s t u d e n t 0 S e p 2 6 1 2 : 2 5 t e s t
  • 7. Access Permissions Introduction to Linux The permissions for this file are listed at the start of the line, starting with rwx. This first set of symbols define owner access. The next set of rwx symbols define group access The last set of symbols defining access permitted for all other users.
  • 8. Access Permissions Introduction to Linux This listing indicates that the file is readable, writable, and executable by the user who owns the file (user Ali) as well as the group owning the file (which is a group named student). The file is also world-readable and world-executable, but not world-writable.
  • 9. Listing the Content of a Directory Introduction to Linux ls is used to list the contents of a directory. If the command ls is written with parameter –l then the command lists contents of the working directory with details. Example: $ ls –l
  • 10. 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
  • 11. 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.
  • 12. 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.
  • 13. Set-user-ID Set-user-ID Set-user-ID(“suid”or“setuid”)bit – On executable files, causes the program to run as file owner regardless of who runs it – Ignored for everything else – In 10-character display, replaces the 4th character (x or -) with s (or S if not also executable) -rws r-x r-x: setuid, executable by all -rwx r-x r-x: executable by all, but not setuid -rwS r-- r--: setuid, but not executable - not useful