You are on page 1of 11

File system mounting, sharing,

protection
11.4. File System mounting
11.5. File Sharing
11.5.1. Multiple Users
Owner Group approach
UID in Unix, SID in Windows
11.6. Protection
11.6.1. Types of access

Silberschatz, 6th ed. Chapters 11.


File System Mounting

mount point
Mounted file system

New file system

This is not lost


File sharing
In a multiuser environment the operating system
• either can allow a user to access the files of other users by
default
• or it may require that a user specifically grant access to the
files.
[root@linuxhost home]# tree
. Student1
|-- student1 Default
| `-- textfile.txt Access
`-- student2
`-- temp
|-- edit User Specific
|-- edit1 Access Student2
`-- text.txt

The Home Directories of Windows Users


Protection
[root@linuxhost home]# tree Student1
.
|-- student1
Controlled
| `-- textfile.txt Access
`-- student2
`-- temp
Full Access
|-- edit No Protection
|-- edit1 Student2
`-- text.txt
No Access
Full Protection
Owner Group Universe approach
We need More Directory Attributes

Users

Groups
The group attribute of
a file is used to define
a subset of users who
may share access to
the file

Permissions
Owner Group Universe approach

Ownership
The owner is the user who:
 may change attributes
Groups  grant access
The group attribute of a file is  has the most control over the file or directory.
used to define a subset of
users who may share access
to the file

-rw-r--r-- 1 student1 CIS1group 124 Aug 24 11:00 .bashrc

1 2 3 4 5 6 7 8 9 10
User owner Group owner file size last modific.date file name
Protection
Ownership
UID in Unix, SID in Windows
Usernames

Security ID
Username
UID in Unix, SID in Windows
Security Identifier (SID) in windows = User Identifier (UID) in Unix
 These numerical identifiers are unique.
 Every user can be in one or more groups.
 Groups also have Group Identifiers (GID) and Group Names.
 After user login and authentication the User ID and Group ID are determined (by
username and password).
 That User IDs are associated with all of the User’s processes and files.
 The GIDs also are included in any process or file association.
 The OS uses only numerical IDs. Names are for people (to show on the screen, to print).

User name /etc/passwd file keeps Usernames, UIDs of Unix system

student1:x:501:501::/home/stud1:/bin/bash
student2:x:502:502::/home/stud2:/bin/bash

Group ID (primary)
User ID
Group ID

/etc/group file keeps Group Names, GIDs of Unix system

student1:x:501:
student2:x:502:
cis215group:x:503:student1,student2
Process Effective Permissions
Runs vi command from vi
executable binary file

-rwxr-xr-x 1 root root 124 Aug 24 11:00 vi

vi becomes a process with the


student2 1319 1277 0 Feb11 tty3 00:00:00 vi Student2 user’s permissions even it
has root, root - owner, group
Effective User ID of Process

root 711 1 0 Feb11 tty1 00:00:00 login -- root


root 713 1 0 Feb11 tty3 00:00:00 login -- student2
root 714 1 0 Feb11 tty4 00:00:00 /sbin/mingetty tty4
root 715 1 0 Feb11 tty5 00:00:00 /sbin/mingetty tty5
root 716 1 0 Feb11 tty6 00:00:00 /sbin/mingetty tty6
root 719 711 0 Feb11 tty1 00:00:00 -bash
root 1189 1 0 Feb11 tty2 00:00:00 login -- student1
student1 1197 1189 0 Feb11 tty2 00:00:00 -bash
student2 1277 713 0 Feb11 tty3 00:00:00 -bash
student2 1319 1277 0 Feb11 tty3 00:00:00 vi
Now this process can access the files accessible for
Student2 user.
It can only read the .bashrc file below because .bashrc
group owner contains as a member the Student2 user.
-rw-r--r-- 1 student1 CIS215group 124 Aug 24 11:00 .bashrc

/etc/group file content


cis215group:x:503:student1,student2
Process User Identifiers in Windows
Process interaction with different permissions
root 711 1 0 Feb11 tty1 00:00:00 login -- root
root 713 1 0 Feb11 tty3 00:00:00 login -- student2
root 714 1 0 Feb11 tty4 00:00:00 /sbin/mingetty tty4
root 715 1 0 Feb11 tty5 00:00:00 /sbin/mingetty tty5
root 716 1 0 Feb11 tty6 00:00:00 /sbin/mingetty tty6 Cannot Kil
root 719 711 0 Feb11 tty1 00:00:00 -bash
root 1189 1 0 Feb11 tty2 00:00:00 login -- student1
student1 1197 1189 0 Feb11 tty2 00:00:00 -bash
student2 1277 713 0 Feb11 tty3 00:00:00 -bash
student2 1319 1277 0 Feb11 tty3 00:00:00 vi

Can Kill

You might also like