To ensure the security of the files used by the new Web site, files need to acce
ID: 3647293 • Letter: T
Question
To ensure the security of the files used by the new Web site, files need to access controls that limit which users can view and execute them. To further your understanding of file permissions, describe in detail these 5 file listings, explain all items on each line, explain what they specify or mean, and give the chmod command to set files with these permissions:-rwxr-xr-- 1 instruct staff 270311 Aug 11 2009 install.sh
-rw-r--r-- 1 instruct staff 348039 Aug 12 2008 User_Guide.txt
-rw-r----- 1 instruct staff 635106 Aug 12 2009 Admin_Guide.txt
drwxr-xr-x 4 instruct staff 144 Aug 12 2009 Documents
-rwsr-sr-x 1 nobody nobody 169202 Aug 11 2009 httpd
It is also a necessity to know and understand regular expressions, not only at the UNIX command line, but editors and some programs use them quite extensively.
Explain the following Metacharacters/Regular Expressions:
*
?
^
$
[0
Explanation / Answer
1.-rwxr-xr-- 1 instruct staff 270311 Aug 11 2009 install.sh this file can be read, written and executed by the owner (owner is instruct) read and execute by a group member (group name is staff) read by everyone 2.-rw-r--r-- 1 instruct staff 348039 Aug 12 2008 User_Guide.txt This file can be read and written by the owner (owner is instruct) read by a group member (group name is staff) read by everyone 3.-rw-r----- 1 instruct staff 635106 Aug 12 2009 Admin_Guide.txt This file can be read and written by the owner (owner is instruct) read by a group member (group name is staff) 4.drwxr-xr-x 4 instruct staff 144 Aug 12 2009 Documents This DIRECTORY can be read, written and executed by the owner (owner is instruct) read and executed by a group member (group name is staff) read and executed by everyone 5.-rwsr-sr-x 1 nobody nobody 169202 Aug 11 2009 httpd This FILE can be read, written and executed (sticky) by the owner (owner is instruct) read, and executed (sticky) by a group member (group name is staff) read and executed by everyone •* Any character •? 0 or more instance of the preceding expression •^ At the beginning of the string •$ At the end of the string •[0–9] any digit from 0 to 9 •[a–z] any lower character from a to z Give a regular expression to match the following: •All files that end in txt *.txt OR txt$ •Files that have a second character of a and end in sh .a.*sh •Any file that starts with a number [0-9]* •A blank line ^$ •A traditional 10-digit U.S.-based phone number, in the following format: ?(XXX) XXX-XXXX ([0-9]{3}) [0-9]{3}-[0-9]{4}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.