Presentation is loading. Please wait.

Presentation is loading. Please wait.

Permissions Done by: fatma almurr Grade: 10BG. Every file has an inode (information node) that stores information about the file, including when the file.

Similar presentations


Presentation on theme: "Permissions Done by: fatma almurr Grade: 10BG. Every file has an inode (information node) that stores information about the file, including when the file."— Presentation transcript:

1 Permissions Done by: fatma almurr Grade: 10BG

2 Every file has an inode (information node) that stores information about the file, including when the file was last modified, file size, data block location, permissions, and ownership (remember, directories are also files in the Linux system). The portion of the inode that stores permission information is called the mode. The mode has three sections:  User (owner) permissions  Group (group owner) permissions  Other (everyone on the Linux system) permissions

3 When you identify permissions, you can either use the letter abbreviation (r, w, x), or the octal number that corresponds to the permission. The following graphic shows a detailed depiction of how permissions are displayed and how they can be referenced. permissionLetter Abbreviation Octal Value Allowed Actions on Files Allowed Actions on Directories Readr100Open and read the file List directory contents if the execute permission is also present Writew10Open, read, and edit the file Add, delete, and rename files if the execute permission is also present Executex1Execute the fileEnter the directory and work with its contents There are three types of permissions contained in the mode, each of which is described in the table below.

4 You should note the following facts about the mode: A d preceding the permissions indicates that the object is a directory. A - identifies a file (the example above is for a file). Permissions are grouped according to user, group, or other permissions. If a permission has not been assigned, a - takes its place in order. When using numbers to represent permissions, add the decimal numbers together within each permission group. Then string the numbers together. For example, the permissions in the graphic above can be represented by the number 764. The root user has all permissions to files and directories regardless of what the mode indicates.

5 To setup file permission you need to use chmod command: chmod {mode} {file-name} To setup file permission 761 you need to use chmod command as follows: # chmod 0761 file To setup a file readable by anyone and writable by the owner only: # chmod 644 file To setup a file readable/executable by everyone and writable by the owner only: # chmod 755 file You can change permissions for all files and directories within a directory by using the -R option on the chmod command. For example, to setup others read and execute access to all files and directories (and files and directories within directories), you need to type command as follows (i.e. change the modes of the file hierarchies rooted in the files instead of just the files themselves): # chmod -R 755 directory-name/ chmod command


Download ppt "Permissions Done by: fatma almurr Grade: 10BG. Every file has an inode (information node) that stores information about the file, including when the file."

Similar presentations


Ads by Google