File System Mounting - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

File System Mounting

Description:

Automatic mounting at boot time according to a system configuration file ... File Sharing on Multi-User Systems. Add owner and group attributes to files ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 10
Provided by: marily214
Category:

less

Transcript and Presenter's Notes

Title: File System Mounting


1
File System Mounting
  • A file system must be mounted before it can be
    accessed.
  • A unmounted file system is mounted at a mount
    point within the directory structure.
  • UNIX
  • All files are arranged in one big tree rooted at
    /.
  • Automatic mounting at boot time according to a
    system configuration file containing a list of
    devices and mount points.
  • Mounts can be done manually using the mount
    command, which attaches the file system on some
    device to the directory tree.
  • Windows
  • Devices and partitions assigned a drive letter.
  • OS automatically discover all devices and mount
    all located file systems at boot time.

2
File System Mounting Example
Partition mounted over /users
(a) An existing file system. (b) An unmounted
partition.
3
File Sharing on Multi-User Systems
  • Add owner and group attributes to files
  • Owner has full control over the file
  • Group defines a subset of users who may share
    access to the file
  • Owner defines which operations can be executed by
    group members and other users
  • Implementation
  • Each user have a user name and a user ID
  • Each group have a group name and a group ID
  • A user can be in multiple groups
  • Owner ID and group ID of a given file are stored
    with other file attributes
  • When a user requests an operation on a file, the
    user ID and groups ID(s) will be compared to the
    owner ID and group ID of the file to determine
    whether the operation is allowed.

4
File Sharing on Distributed Systems
  • In distributed systems, files may be shared
    across a network via
  • Manual transfer (FTP)
  • Distributed file system (DFS)
  • World Wide Web (WWW)
  • DFS remote directories visible from local
    machine
  • A host can mount a file system from a remote host
  • The host containing the files is called server
  • The host wanting access to the files is called
    client
  • Once a remote file system is mounted, the client
    can access the files as if they are local.

5
Consistency Semantics
  • Consistency semantics specifies the semantics of
    multiple users accessing a shared file
    simultaneously
  • File session the series of accesses between the
    open and close operations
  • UNIX semantics
  • Writes to an open file by a user are visible
    immediately to other users that have this file
    open at the same time.
  • One mode of sharing allows users to share the
    current-file-position pointer of a file. If one
    user advances the pointer, all users are
    affected.
  • Session semantics
  • Writes to an open file by a user are not visible
    immediately to other users that have the same
    file open simultaneously.
  • Once a file is closed, the changes made to it are
    visible only in sessions starting later.
  • Used in Andrew File System (an influential DFS)

6
Protection
  • Goal keep files safe from improper access
  • File owner should be able to control
  • What can be done
  • By whom
  • Types of access that may be controlled
  • Read
  • Write
  • Execute
  • Append
  • Delete
  • List (file name and attributes)

7
Access-Control List (ACL)
  • Make access dependent on the identity of the user
  • Each file/directory is associated with an
    access-control list (contained in directory
    entry) specifying user name and allowed access
  • Drawbacks of ACL
  • Long length
  • Variable size directory entry

8
Protection in UNIX
  • Three classifications of users for each file
  • Owner the user who created the file
  • Can be changed with chown command by superuser
  • Group a set of users who need similar access to
    the file
  • Created by superuser
  • Can be changed with chgrp command by superuser
  • Universe all other users
  • Can specify read, write, execute permissions for
    owner, group, and universe
  • RWX
  • owner access 6 ? 1 1 0 group access 4
    ? 1 0 0
  • universe access 0 ? 0 0 0
  • chmod command is used to change file access
    permissions
  • E.g. chmod 640 paper.doc

9
Protection in UNIX
  • Protection bits for directories
  • r a user can list the content of the directory
    if set
  • w a user can create or delete files in the
    directory if set
  • x a user can change into the directory if set
  • A sample directory listing
  • drwxr----- 1 ruan cs352 4096 May 10
    1002 HWSolution
  • -rw-r----- 1 ruan cs352 4259 Sep 12
    1505 sample-code.c
  • -rw-r--r-- 1 ruan cs352 4300 Oct 3
    1732 homepage.html
Write a Comment
User Comments (0)
About PowerShow.com