Chapter 10 File System Security
Security Policies security policies are doors maintain a balance between total access and total security UNIX has two default security features: user logins and passwords file and directory protection with permissions default for files Read/Write for User and read only for Group and Other default for directories Read/Write/Execute for User and Read/Execute for Group and Other
File System Permissions user - owner / creator of file or directory group - primary group to which owner belongs other - world, everybody else looks at the first set of permissions that match who you are - r w - r - - r - - d r w x r - x r - x
Permissions
User & Group ID ls -n displays the UID and the GID id displays numeric and alphabetic User ID and Group ID for your Effective User ID (EUID) groups displays all of the groups you are a member of
Changing Permissions Syntax $ chmod mode filename The mode portion is made up of three parts: Who -Category you are working with u = user g = group o = others a = all Op - Operator set (=) remove (-) give (+) Permission(s) assigned – Read (r), Write (w) or Execute (x)
Changing Permissions - Symbolic
Permissions - Octal Mode octal - eight possible numbers in group bits are either on (1) or off (0) 7r w x r w r - x r w x w x
Changing Permissions - Octal
Changing Permissions - CDE Or right click on item
Lab Determining Permissions Lab Changing Permissions from the Command Line Lab Changing Permissions from File Manager chapter 10 assessment Labs/Assessment
1. create a script file which will clear your screen, output the current month's calendar, and output the current date Chap 9 & 10 Exercises
1. create a script file which will clear your screen, output the current month's calendar, and output the current date $ vi firstscript type i to get into entry mode in vi editor type clear;cal;date press escape, then colon, then wq! Chap 9 & 10 Exercises
2. now run this script $ firstscript Chap 9 & 10 Exercises
2. now run this script $ firstscript won't work? why not? Chap 9 & 10 Exercises
2. now run this script $ firstscript won't work? why not? because default permissions don't include execute! Chap 9 & 10 Exercises
2. now run this script $ firstscript won't work? why not? because default permissions don't include execute! 3. fix this problem Chap 9 & 10 Exercises
2. now run this script $ firstscript won't work? why not? because default permissions don't include execute! 3. fix this problem $ chmod 755 firstscript Chap 9 & 10 Exercises