Home Directory
The Home Directory is basically the place that all of a user's files and folders are stored. From the home directory, one may be able to access all of their files, or just access specifically places files. The user is able to completely customize their home directory. When files and folders are in a home directory (including readable, writable, and executable files), they are only able to be accessed by the user or any other administrator on the system. That can be changed at any point, however.
file ownership(access control)
Allowing others to view or change a files
Demonstration of the indicated keyword.
File ownership (access control), like previously stated, determines who can either read, write, or execute a file or directory.
First, by entering 'ls' into the terminal, you can see what files are in that directory, but if you add a '-l', you can see who has access to the files. The order displayed is Owner, Group, World. For Example
lab46:~/src/unix$ ls -l total 16 -rwxrwxrwx 1 jcavalu3 lab46 115 Sep 19 16:44 logincnt.sh _O__G__W_ O - Owner/G - Group/W - World drwxr-xr-x 6 jcavalu3 lab46 66 Sep 27 23:59 projects -rwx------ 1 jcavalu3 lab46 147 Sep 28 15:36 script2.sh -rwx------ 1 jcavalu3 lab46 574 Sep 28 16:52 script3.sh drwxr-xr-x 3 jcavalu3 lab46 16 Sep 26 11:39 submit -rw-r--r-- 1 jcavalu3 lab46 195 Sep 7 15:45 unixstuffs lab46:~/src/unix$
To edit a file and who can access it, simply input the command 'chmod 744* script2.sh'.
chmod stands for change mode, which is the program that allows you to modify who can access the file Followed by the change in access Lastly, the file should follow behind the change in access
* Each number represents one of the three types of access (OGW). The number for each type or access is 4(read - r), 2(write - w), 1(execute - x). The size of the number input depends on what type of access the modifier would like each “group” to access. 744 means that the Owner can read, write and execute, the Group can read and execute, and the World can read and execute.
Example:
lab46:~/src/unix$ ls -l total 16 -rwxrwxrwx 1 jcavalu3 lab46 115 Sep 19 16:44 logincnt.sh drwxr-xr-x 6 jcavalu3 lab46 66 Sep 27 23:59 projects -rwx------ 1 jcavalu3 lab46 147 Sep 28 15:36 script2.sh ^ ^ ^ -rwx------ 1 jcavalu3 lab46 574 Sep 28 16:52 script3.sh drwxr-xr-x 3 jcavalu3 lab46 16 Sep 26 11:39 submit -rw-r--r-- 1 jcavalu3 lab46 195 Sep 7 15:45 unixstuffs lab46:~/src/unix$ chmod 744 script2.sh lab46:~/src/unix$ ls -l total 16 -rwxrwxrwx 1 jcavalu3 lab46 115 Sep 19 16:44 logincnt.sh drwxr-xr-x 6 jcavalu3 lab46 66 Sep 27 23:59 projects -rwxr--r-- 1 jcavalu3 lab46 147 Sep 28 15:36 script2.sh ^ ^ ^ -rwx------ 1 jcavalu3 lab46 574 Sep 28 16:52 script3.sh drwxr-xr-x 3 jcavalu3 lab46 16 Sep 26 11:39 submit -rw-r--r-- 1 jcavalu3 lab46 195 Sep 7 15:45 unixstuffs lab46:~/src/unix$