File protection based on access permissions is provided by a mechanism that prevents users from accessing each others’ files when they are not logged on as the owner of a file. As the owner of a file, you can attach certain access rights to the file that dictate who can and cannot access it for various types of file operations. This scheme is based on the types of users, the types of access permissions, and the types of operations allowed on a file under LINUX. Without such a protection scheme, users can access each others’ files because the LINUX file system structure (see Figure 7.2) has a single root from which hang all the files in the system. The number of protection bits needed to implement this scheme is equal to the product of the number of types of users and the number of types of

What will be an ideal response?

The read permission on an ordinary file allows you to read the file, including displaying it on the monitor screen by using, for example, the cat command. When the read permission is set for a directory, you can read the directory. In particular, you can use the ls command to display the contents of the directory (i.e., the names and other attributes of the files and directories in it).
The write permission on an ordinary file allows you to edit the file, including writing and deleting the file’s contents by using an editor such as vi. You can also delete a file if you have the write permission for it. When the write permission is set for a directory, you can create new directory enteries (files and directories) in it as well as delete the existing enteries. In particular, you can use an editor or the cat, cp, mv, mkdir, and rmdir commands to add and delete files and subdirectories in the directory that you have the write permission for.
The execute permission on an ordinary file allows you to execute the file. You have to set the execute permission for a file that contains a binary executable code or a shell script before the script (or binary code) can be executed. The execute permission for a directory allows you to search the directory. Thus you can list the contents of the samples directory by using the ls ~/unixbook/scripts/samples command if you have the execute permission for the unixbook directory in your home directory and the scripts directory under ~/unixbook, and search and read permissions for samples. If you do not have search permission for a directory, you cannot make that directory your current directory by using the cd command.

Computer Science & Information Technology

You might also like to view...

The ArrayBlockingQueue method ________ returns the number of elements currently in the ArrayBlockingQueue?

a. size. b. length. c. getSize. d. getLength.

Computer Science & Information Technology

A conspiracy or cooperation between two or more individuals or groups to commit illegal or unethical actions is known asracketeering. __________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology