CIS 132 Linux 1 Chapter 4 Quiz

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

After typing the command umask 731, the permissions on all subsequently created files and directories will be affected. In this case, what will be the permissions on all new files?

---r--rw- New files receive rw-rw-rw- from the system less the umask. A umask of 731 will remove rwx-wx--x from these permissions (if present), leaving ---r--rw-.

The command chmod 317 file1 would produce which of the following lines in the ls command?

--wx--xrwx 1 user1 root 0 Apr 29 15:40 file1 The permissions in a mode are represented by the numbers r (4), w (2), and x (1). Thus, 3 = wx (2+1), 1 = x, and 7 = rwx (4+2+1)

You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate?

Additional entries exist within the ACL of the file that can be viewed using the getfacl command. A + symbol next to the mode of a file indicates that additional users and/or groups have been added to the access control list (ACL). You can use the getfacl command to view the full ACL.

A symbolic link is depicted by an @ symbol appearing at the beginning of the filename when viewed using the ls -l command.

False: A symbolic link is indicated by l (lowercase L) at the beginning of a long file listing.

Only the root user can modify a file that has the immutable attribute set.

False: Immutable means that not even god himself could change it

There is no real difference between the "S" and "s" special permissions when displayed using the ls -l command. One just means it is on a file, and the other means that it is on a directory.

False: The S special permission indicates that an underlying x permission has not been set, while the s special permission indicates that an underlying x permission has been set.

What does the mv command do? (Choose all that apply.)

It moves a directory to another location on the filesystem. It moves a file to another location on the filesystem.

What must a Fedora Linux user do to run cp or mv interactively and be asked whether to overwrite an existing file?

Just run cp or mv because they run in interactive mode by default. Run cp -i or mv -i IS INCORRECT

The root user utilizes the chown command to give ownership of a file to another user. What must the root user do to regain ownership of the file?

Run chown and list the root user as the new owner. Run chgrp again listing the root user as the new owner IS INCORRECT

What was created to define a standard directory structure and common file location for UNIX and Linux systems?

The Filesystem Hierarchy Standard (FHS) is referenced by UNIX and Linux systems.

Given the following output from the ls command, how many other files are hard linked with file3? drwxr-xr-x 3 root root 4096 Apr 8 07:12 Desktop-rw-r--r-- 3 root root 282 Apr 29 22:06 file1-rw-r--r-- 1 root root 282 Apr 29 22:06 file2-rw-r--r-- 4 root root 282 Apr 29 22:06 file3-rw-r--r-- 2 root root 282 Apr 29 22:06 file4-rw-r--r-- 1 root root 282 Apr 29 22:06 file5-rw-r--r-- 1 user1 sys 282 Apr 29 22:06 file6

Three

Hard links need to reside on the same filesystem, whereas symbolic links need not be on the same filesystem as their target.

True: Since hard links share the same inode number, and inode numbers are unique to their filesystem, hard links cannot be made to files on other filesystems. Symbolic links do not share the same inode number and can be made to any file on any filesystem.

After typing the ls -F command, you see the following line in the output:-rw-r-xr-- 1 user1 root 0 Apr 29 15:40 file1How do you interpret the mode of file1?

User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file: The first three permissions apply to the owner (user1), the second three permissions apply to members of the group owner (root), and the remaining permissions apply to everyone else.

When applied to a directory, the SGID special permission _____.

causes all new files created in the directory to have the same group membership as the directory, and not the entity that created them When set on a directory, the SGID ensures that newly created files and subdirectories within are configured with the same group owner of the directory.

A file has the following permissions: r----x-w-. The command chmod 143 file1 would have the same effect as the command _____. (Choose all that apply.)

chmod u=x,g=r,o=wx file1 The 143 permissions (--xr---wx) can be obtained by subtracting r and adding x to the user category, subtracting x and adding r to the group category, and adding x to the other category. Alternatively, you can use the = symbol to set the target permissions for the user, group, and other categories to x, r, and wx, respectively.

Which of the following commands will change the user ownership and group ownership of file1 to user1 and root, respectively?

chown user1:root file1 You can specify either user1:root or user1.root as the first argument to the chown command to change the ownership of a file to the user1 user and root group.

What does the /var directory contain?

log files and spool directories The /var directory contains files that grow in size, such as log files and spool directories (e.g., print spools).

The default permissions given by the system prior to analyzing the umask are _____ for newly created directories and _____ for newly created files.

rwxrwxrwx and rw-rw-rw- The system assigns all permissions (rwxrwxrwx) to new directories, and all permissions except for execute (rw-rw-rw-) to new files.

The which command _____.

searches for a file only in directories that are in the PATH variable The which command only searches for files within the directories listed in the PATH variable.

When you change the data in a file that is hard-linked to three others, _____.

the data in the file you modified as well as the data in all hard-linked files are modified because they share the same data and inode. Because hard links share the same inode and data section, all hard linked files are updated when you modify a single one.


Set pelajaran terkait

Chapter 42 Circulation and Gas Exchange

View Set

Taylor's Chapter 15: Evaluating (Prep U)

View Set

Travel and Tourism Team Decision Making Exam

View Set