SlideShare a Scribd company logo
Introduction to Linux-3
DevOps Essentials
2020
Users and Groups
 Users are associated with a unique user identification (UID) number
that the system uses internally.
 Users can be real people.
 Users can be system entities.
 Users can be herded via groups.
 Groups also are associated with a unique group identification (GID)
number by the system.
 Groups allow multiple users to access/share the same files.
Ownership & Permissions
 Linux systems are multi user environments that allow users to create
files, run programs and share data.
 Files and directories have two types of ownership the user and group.
A Linux group consists of one or more users.
 Files and directories have three types of access permissions:
a)read permission (r)
b)write permission (w)
c)execute permission (x)
 Every file and directory has permissions for three levels or entities of
permissions:
a)user or owner (denoted by u)
b)group (one or more users denoted by g)
c)others or world (denoted by o)
Permissions triplets
Each triplet indicates the access permissions for that level – in the example
below,the user/owner has read,write & execute permission,other group
members only have read and execute permissions and all others have no
access permissions.
Changing Permissions and Ownership
 Use ‘ chmod ’ to change the file:
 chmod [ ugoa ][+/-][ rwx ] filename
 where u=user, g=group, o=others or world and a=all three
 For example, to provide group read access to a file:
 $ chmod g+r myfile
 Or to remove file access to another than the owner or group members
(in other words, others):
 $ chmod o-rwx myfile
 The ‘ chown ’ command is used to change file ownership and the
chgrp ’ command can change group ownership of a file. As a regular
user, you can not change the ownership of a file, but you can change
the group ownership if you are a member of the group to which you
are changing the group ownership.
 You can use the R argument on any of the above to recursively make
changes on a directory of files.
Lab 2
1)First go to your home directory.
2)Make a ‘LinuxClass’ directory using the mkdir command & go into
that directory.
3)Create 5 empty files in LinuxClass directory.
4)Show permission of newly created files.
5)Add execute permission for group on 2 of the files and make other 3
world readable.
6)Now, remove the execute permission of LinuxClass for all.
7)Change directory to your home directory, then try to see all files under
LinuxClass and then finally go into that directory.
8)Explain what happened and why?

More Related Content

PDF
Unit 4 user and group
PPT
Linux files and file permission
PPTX
Users and groups
PPTX
Access control list acl - permissions in linux
DOCX
Advanced file permissions in linux
PDF
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
PPTX
User and groups administrator
PDF
Unit 12 finding and processing files
Unit 4 user and group
Linux files and file permission
Users and groups
Access control list acl - permissions in linux
Advanced file permissions in linux
Sa1 chapter-5-managing-local-linux-users-and-groups-v2 (4)
User and groups administrator
Unit 12 finding and processing files

What's hot (16)

PDF
Unit3 browsing the filesystem
PPT
Operating System
PDF
File permission of linux
PPTX
Find and locate
PPTX
File permission in Linux
PPTX
DOC
Uop pos 433 week 4 file processing commands worksheet new
ODP
Basic Cli By M Fawzy
TXT
PDF
What is new in CFEngine 3.6
PPTX
Marwan al suwaidi
PPT
Linux lecture
PPTX
PPTX
The LINUX File System - R.D.Sivakumar
PPT
Bootcamp linux commands
DOCX
file compression/zip file.report
Unit3 browsing the filesystem
Operating System
File permission of linux
Find and locate
File permission in Linux
Uop pos 433 week 4 file processing commands worksheet new
Basic Cli By M Fawzy
What is new in CFEngine 3.6
Marwan al suwaidi
Linux lecture
The LINUX File System - R.D.Sivakumar
Bootcamp linux commands
file compression/zip file.report
Ad

Similar to Introduction to linux day3 (20)

PPTX
permissions.pptx computer science and tec
PDF
Course 102: Lecture 14: Users and Permissions
ODP
CS50x Permissions, Files, Users
PPTX
File permissions
PPTX
Topic 3-1_More_Linux_Commands.pptx
PDF
Presentación RHEL.pdf
PPT
UNIX -File attributes and permissions; The Security Implications
PPTX
Introduction to linux day-3
PPT
04-1-Linux.ppt
PPT
Unix fundamentals
PPT
06 users groups_and_permissions
PDF
Linux Security
PPT
OS Unit IV.ppt
PPT
Unix Basics 04sp
PPTX
Ai module
PDF
Exploitation and distribution of setuid and setgid binaries on Linux systems
PPT
Basic Linux day 2
PDF
Linux Fundamentals and how to use linux.pdf
PPT
PowerPoint Presentation Microsoft notes .ppt
PDF
Linux OS guide to know, operate. Linux Filesystem, command, users and system
permissions.pptx computer science and tec
Course 102: Lecture 14: Users and Permissions
CS50x Permissions, Files, Users
File permissions
Topic 3-1_More_Linux_Commands.pptx
Presentación RHEL.pdf
UNIX -File attributes and permissions; The Security Implications
Introduction to linux day-3
04-1-Linux.ppt
Unix fundamentals
06 users groups_and_permissions
Linux Security
OS Unit IV.ppt
Unix Basics 04sp
Ai module
Exploitation and distribution of setuid and setgid binaries on Linux systems
Basic Linux day 2
Linux Fundamentals and how to use linux.pdf
PowerPoint Presentation Microsoft notes .ppt
Linux OS guide to know, operate. Linux Filesystem, command, users and system
Ad

More from Gourav Varma (20)

PPTX
Jenkins introduction
PPTX
Docker introduction (1)
PPTX
Aws day 4
PPTX
Aws day 3
PPTX
Aws day 2
PPTX
Ansible day 4
PPTX
Ansible day 3
PPTX
Adnible day 2.ppt
PPTX
Ansible day 1.ppt
PPTX
Version control git day03(amarnath dada)
PPTX
Version control git day02
PPTX
Version control git day01
PPTX
Dev ops
PPTX
Shell programming 2
PPTX
Introduction to linux
PPTX
Final terraform
PPTX
Version control git day03
PPTX
Version control git day02
PPTX
Version control git day01
PPT
Docker swarm
Jenkins introduction
Docker introduction (1)
Aws day 4
Aws day 3
Aws day 2
Ansible day 4
Ansible day 3
Adnible day 2.ppt
Ansible day 1.ppt
Version control git day03(amarnath dada)
Version control git day02
Version control git day01
Dev ops
Shell programming 2
Introduction to linux
Final terraform
Version control git day03
Version control git day02
Version control git day01
Docker swarm

Recently uploaded (20)

PPTX
OOP with Java - Java Introduction (Basics)
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Sustainable Sites - Green Building Construction
PDF
PPT on Performance Review to get promotions
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Geodesy 1.pptx...............................................
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPT
introduction to datamining and warehousing
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Construction Project Organization Group 2.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Lecture Notes Electrical Wiring System Components
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
OOP with Java - Java Introduction (Basics)
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
Sustainable Sites - Green Building Construction
PPT on Performance Review to get promotions
CYBER-CRIMES AND SECURITY A guide to understanding
Geodesy 1.pptx...............................................
R24 SURVEYING LAB MANUAL for civil enggi
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT-1 - COAL BASED THERMAL POWER PLANTS
introduction to datamining and warehousing
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Mechanical Engineering MATERIALS Selection
Construction Project Organization Group 2.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Lecture Notes Electrical Wiring System Components
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
bas. eng. economics group 4 presentation 1.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

Introduction to linux day3

  • 2. Users and Groups  Users are associated with a unique user identification (UID) number that the system uses internally.  Users can be real people.  Users can be system entities.  Users can be herded via groups.  Groups also are associated with a unique group identification (GID) number by the system.  Groups allow multiple users to access/share the same files.
  • 3. Ownership & Permissions  Linux systems are multi user environments that allow users to create files, run programs and share data.  Files and directories have two types of ownership the user and group. A Linux group consists of one or more users.  Files and directories have three types of access permissions: a)read permission (r) b)write permission (w) c)execute permission (x)  Every file and directory has permissions for three levels or entities of permissions: a)user or owner (denoted by u) b)group (one or more users denoted by g) c)others or world (denoted by o)
  • 4. Permissions triplets Each triplet indicates the access permissions for that level – in the example below,the user/owner has read,write & execute permission,other group members only have read and execute permissions and all others have no access permissions.
  • 5. Changing Permissions and Ownership  Use ‘ chmod ’ to change the file:  chmod [ ugoa ][+/-][ rwx ] filename  where u=user, g=group, o=others or world and a=all three  For example, to provide group read access to a file:  $ chmod g+r myfile  Or to remove file access to another than the owner or group members (in other words, others):  $ chmod o-rwx myfile  The ‘ chown ’ command is used to change file ownership and the chgrp ’ command can change group ownership of a file. As a regular user, you can not change the ownership of a file, but you can change the group ownership if you are a member of the group to which you are changing the group ownership.  You can use the R argument on any of the above to recursively make changes on a directory of files.
  • 6. Lab 2 1)First go to your home directory. 2)Make a ‘LinuxClass’ directory using the mkdir command & go into that directory. 3)Create 5 empty files in LinuxClass directory. 4)Show permission of newly created files. 5)Add execute permission for group on 2 of the files and make other 3 world readable. 6)Now, remove the execute permission of LinuxClass for all. 7)Change directory to your home directory, then try to see all files under LinuxClass and then finally go into that directory. 8)Explain what happened and why?