1 / 11

Learning basic command

Learning basic command. Understanding file permission. Why Are File Permissions Important ? Keep users from accessing other users’ private files To protect important system files. Understanding file permission. permissions bits : rwx rwx rwx Owner’s| Group | Others

Download Presentation

Learning basic command

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Learning basic command

  2. Understanding file permission Why Are File Permissions Important ? • Keep users from accessing other users’ private files • To protect important system files

  3. Understanding file permission permissions bits: rwx rwxrwx Owner’s| Group | Others r = read w = write x = execute For Files: "Read" means to be able to open and view the file "Write" means to overwrite or modify the file "eXecute" means to run the file as a binary files are executable only if they are programs and shell scripts, not useful for data files. For Directories: "Read" means to be able to view the contents of the directory "Write" means to be able to create new files/directories or delete files/directories within the directory "eXecute" means to be able to "Change Directory" (cd) into the directory = permission to access the directory.

  4. Understanding file permission How to view the permission for a file or directory? $ ls–al Default permission for an new file : rw:by the owner of the file. r: by group members and others. rw- r-- r— Default permission for an new directory: rwx:by the owner of the directory . rx:by group members and others. rwx r-x r-x

  5. Understanding file permission Only the owner of a file can change its permission. How to set file permission? Use the command chmod(change file mode bits). chmod has two notations: • Numeric (Octal) Notation. • Symbolic Notation

  6. Understanding file permission 1. Add single permission to a file/directory $ chmod u+x filename 2. Add multiple permission to a file/directory $ chmod u+r,g+x filename 3. Remove permission from a file/directory . $ chmod u-rx filename 4. Change permission for all roles on a file/directory $ chmod a+x filename

  7. Evaluation 1 - Create new directory 2-Change directory Permissions using Numeric Notation. Owner >> read , write , execute Group >>read , write Other >> read 3-Create new file inside the directory 4- Change file Permissions using Symbolic Notation All (Owner+group+other)>> read 5-view the permission for a file and directory

More Related