SlideShare a Scribd company logo
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.ppt
anwarkade1
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
SaifUrRahman180
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.ppt
Nikhil 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 fundamentals
Dima 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_Commands
Gautam Raja
 
Host security
Host securityHost security
Host security
Nguyen Tam
 
Host security
Host securityHost security
Host security
Nguyen Tam
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
Papu Kumar
 
Unit 4 user and group
Unit 4 user and groupUnit 4 user and group
Unit 4 user and group
root_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 Pandas
Prabu U
 
18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma
perweeng31
 
Linux administration classes in mumbai
Linux administration classes in mumbaiLinux administration classes in mumbai
Linux administration classes in mumbai
Vibrant Technologies & Computers
 
Introduction to linux day3
Introduction to linux day3Introduction to linux day3
Introduction to linux day3
Gourav Varma
 
prateekporwal
prateekporwalprateekporwal
prateekporwal
prateekporwal
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
Saikumar Daram
 
Ppt linux
Ppt linuxPpt linux
Ppt linux
Gurpreet Kaur
 
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
Sreenatha Reddy K R
 
Linux
LinuxLinux
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 

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
 
18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma
 
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
 

More from EidTahir

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

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

مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 

Recently uploaded (20)

مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 

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