1 / 19

Let’s log on using Secure Shell.

Let’s log on using Secure Shell. Permissions. You can set permissions for accessing your files, and you should do this. From within a directory or subdirectory, issue a ls –l command (those are letter ls not numeral 1s) This will list the subdirectories and files within ‘that’ subdirectory.

flynn-silva
Download Presentation

Let’s log on using Secure Shell.

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. Let’s log on using Secure Shell.

  2. Permissions • You can set permissions for accessing your files, and you should do this. • From within a directory or subdirectory, issue a ls –l command (those are letter ls not numeral 1s) • This will list the subdirectories and files within ‘that’ subdirectory. • You can then issue a change feature (ahead) to allow / prevent certain accesses. • Typically you will use something like: (change modifications) $ chmod 755 myfile.c <return> This gives total permissions to you and read and execute permissions to ‘group’ and ‘others’ (more ahead)

  3. Setting File Permissions 5 5 7 1 1 1 1 0 1 1 0 1 $ chmod 755 filename

  4. Setting File Permissions • chmod command • To set file permissions • Syntax: $chmod UGO <file name> • Where U=user, G=group, and O=other • Setting permissions to directories • Use the execute (x) to grant access

  5. Setting File Permissions • DO NOT CHANGE COMMANDS UNTIL YOU UNDERSTAND ALL OF THIS!!! • Practice: • $chmod 700 a_file • $chmod 640 a_directory • $chmod 604 a_file • The system you are learning is referred to as octal represented. • How else can I change user permissions with the chmod command?

  6. Setting File Permissions • Basic Unix permissions are broken up into three groups: • Owner - Can manage own files • Group -Everyone in group manages files • Others - Everyone in the world manages files

  7. Setting File Permissions • There are three Unix file permissions: • Read (4) • You may read this file • Write (2) • You may write/delete this file • Execute (1) • You may execute this file (binary or script) • Unlike Windows, the filename's extension means nothing to the operating system. However, it is important for maintenance to follow some convention.

  8. Setting File Permissions • Common permission 1: • Owner: Read, Write • Group: Read • World: Read • Common permission 2: • Owner: Read, Write, Execute • Group: Read, Execute • World: Read, Execute • Common permission 3: • Owner: Read, Write, Execute • Group: Read, Execute • World: nothing

  9. Setting File Permissions • Each letter has a value: r=4, w=2, x=1 • Add them up to determine their meaning. • rw (read/write) = (r+w) = (4+2) = 6 • rwx (read/write/execute) = (r+w+x) = (4+2+1) = 7 • rx (read/execute) = (r+x) = (4+1) = 5    owner    group    world     |        |        |    -----    -----    -----   |     |  |     |  |     |-  -  -  -  -  -  -  -  -  -d  r  w  x  r  w  x  r  w  x

More Related