Monday, July 22, 2019

File Systems and Permissions Summary

File Systems and Permissions Summary John David Woody chmod -rwxr-xr-1 instruct staff 270311 Aug 11 2009 install.sh I will attempt explain the best I can. Chmod, on linux or unix like operating systems, there are a set of rules for each file which defines who can access that file and how they can access it. The at position 0 denotes the type of file, it is either a d if the item is a directory or l if it is a link or it could just be a regular file. The symbols in the positions 1 thru 3 rwr are permissions for the owner of the file and the symbols in position 4 thru 6 r-x are positions for a group, the remaining positions 7 thru 9 r-1 are permissions for anyone else. The rwx shows that owner has read (r), write (w) and execute (x) permission. The shows the permissions for the group to which the file belongs. The r-xr represents that has permission to read (r) and execute (x) and, read permissions without write permission. The last xr-1 set of characters, represents the permissions for everybody else. The octal numbers 270311 each have individual meanings for permissions. I researched this at, the WEB site below on the reference page. Now, 2 is for write, the 7 where my confusion stepped in is the numeric mode from one to four octal digits which are derived by adding up the bit values, so 4 is for read , 2 for write, and 1 is for execute when added equals 7 so all access is allowed. The 0 from what I read has no permissions. The 3 is for write and execute and the 1s only can execute. How the commands and the octal numbers relate requires me to do more homework. The remaining items below 2 -5 and 1 4, will be described and follow the same patterns as above. I just hope Im explaining things correctly. Chmod -rw-rr1 instruct staff 348039 Aug 12 2008 User_Guide.txt Chmod, on linux or unix like operating systems, there are a set of rules for each file which defines who can access that file and how they can access it. The at position 0 denotes the type of file, it is either a d if the item is a directory or l if it is a link or it could just be a regular file. The symbols in the positions 1 thru 3 rw- are permissions for the owner of the file and the symbols in position 4 thru 6 r are positions for a group, the remaining positions 7 thru 10 r1 are permissions for anyone else. Now, this textual representation consist of 10 characters but from what I have read the rules still apply. The octal numbers 348039 each again have individual meanings for permissions. Now, 3 is for write, the 4 is for read, 8 again confusion stepped in until I will research this more. The 0 is for denial, 3 again is for write and of course there is a 9 Ill also have to look into. Chmod -rw-r1 instruct staff 635106 Aug 12 2009 Admin_Guide.txt Chmod, on linux or unix like operating systems, there are a set of rules for each file which defines who can access that file and how they can access it. The at position 0 denotes the type of file, it is either a d if the item is a directory or l if it is a link or it could just be a regular file. The symbols in the positions 1 thru 3 rw- are permissions for the owner of the file and the symbols in position 4 thru 6 r are positions for a group, the remaining positions 7 thru 10 1 are permissions for anyone else. Now, this textual representation consist of 10 characters but from what I have read the rules still apply. The octal numbers 635106 each again have individual meanings for permissions. Now, 6 is for read/write, the 3 is for write, 5 is for read/execute. The 1 is for execute only, 0 all access denied and 6 read/write. Chmod drwxr-xr-x 4 instruct staff 144 Aug 12 2009 Documents Chmod, on linux or unix like operating systems, there are a set of rules for each file which defines who can access that file and how they can access it. The d at position 0 denotes the type of file, it is either a d if the item is a directory or l if it is a link or it could just be a regular file. Well this is a directory. The symbols in the positions 1 thru 3 rwx are permissions for the owner of the file and the symbols in position 4 thru 6 -x4 are positions for a group. The octal numbers 144 each again have individual meanings for permissions. Now, 1 is for execute only. The two 4s are read only access. chmod -rwsr-x 1 nobody nobody 169202 Aug 11 2009 httpd Chmod, on linux or unix like operating systems, there are a set of rules for each file which defines who can access that file and how they can access it. The at position 0 denotes the type of file, it is either a d if the item is a directory or l if it is a link or it could just be a regular file. The symbols in the positions 1 thru 3 rws are permissions for the owner of the file and the symbols in position 4 thru 7 r-x1 are positions for a group. The octal numbers 169202 each again have individual meanings for permissions. Now, 1 is for execute only. The 6 is for read/write allowed, the 9 I still have not figured out yet, but I will. The 2 is for write access only, the 0 means all access denied, again the 2 is write access only. Metacharacters/Regular Expressions * Matches zero or more occurrences of the previous character ? The preceding item is optional and will be matched, at most, once. ^ The caret ^ is an anchor that indicates the beginning of a line. $ The asterisk is a modifier and also an anchor. In a regular expression it specifies that a previous character set can appear any number of times, that includes a zero. [0-9] Matches any one of the numbers given within chars, where chars Is a sequence of characters. [a-z] Matches any one of the characters given within chars, where chars Is a sequence of characters. Regular expressions to match the following All files that end in txt ls -1 grep *.txt Files that have a second character of a and end in sh ls -1 | grep *.sh Any file that starts with a number ls -l | grep [0-9] A blank line ls -l | grep [] A traditional 10-digit U.S.-based phone number, in the following format: (407) 555-1212 ls -l | grep [(0-3)] [0-3]-[0-4] Note: Not quite sure about this one but I tried. Reference www.computerhope.com/unix/uchmod.htm

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.