Linux LPI 117-101 # 8 Of 9

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Tobyyy
T
Tobyyy
Community Contributor
Quizzes Created: 10 | Total Attempts: 1,461
| Attempts: 127 | Questions: 55
Please wait...
Question 1 / 55
0 %
0/100
Score 0/100
1. Which file contains information about filesystems and their respective mount points?

Explanation

Usually to mount the filesystem we use the mount command but that is
only for the current session. To mount the filesystem at boot time automatically we
use /etc/fstab.
Pattern of /etc/fstab
Device mount point filesystem mount options dump fsck
Example
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
none /proc proc defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var1 /var ext3 defaults 1 2
LABEL=SWAP-hda7 swap swap defaults

Submit
Please wait...
About This Quiz
Linux LPI 117-101 # 8 Of 9 - Quiz

This quiz, titled 'Linux LPI 117-101 # 8 of 9', assesses knowledge on managing file systems in Linux, specifically focusing on the \/etc\/fstab file. It tests understanding of... see morefile system entries, mounting options, and user quotas, essential for system administrators and IT professionals. see less

2. What umask will set the file permissions on a newly created file to -rw-r--r-- (644)?

Explanation

umask command is used to display and set the default permissions.
Here in #######*******QUESTION asking for the umask value of newly created file having

permission
644. If any permission is not changed then special permission i.e SUID, SGID and
sticky bits are not set.
Then in for have total permission for file is:
7666
-7644
0022

Submit
3. What command (with parameter[s]) would you type to mount all partitions
specified in the /etc/fstab?

Explanation

mount command displays all mounted filesystem and mount -a mount
all filesystem written /etc/fstab.

Submit
4. You have a floppy image called boot.img in your current working directory and
wish to transfer this image to a floppy device /dev/fd0. Type in the simplest
command that would do this?

Explanation

dd command creates the disk image, the above command creates the
image of boot.img and writes the image into /dev/fd0.

Submit
5. You are building a server that will have many hardware and operating system
upgrades. The server is the file server for all users on your 100 user network. Which
directory should have its own mountpoint and/or hard drive?

Explanation

/home is the user's base directory where users home directory will
create. According to QUESTION that there are more than 100 users so /home needs to
mount on separate partition.

Submit
6. What must be added to the following to enable group quotas for /usr?
/dev/hda2 /usr ext2 defaults 1 1

Explanation

grpquota enables the group quota accounting and limits according to
the policy of administrator.
Example:
LABEL=/home /home ext3 defaults,grpquota 1 1

Submit
7. On a standard Linux system as a normal user, what umask value will cause your file
to be created with the following permissions ?
drwxr-x--- 2 username group 512 Mar 6 11:16 dir1
-rw-r----- 1 username group 0 Mar 6 11:16 file1

Explanation

In terms of umask, you need to look at things backwards... When you

see a umask of 027 it's the same as a pattern of ----x-xxx, right? Now, since it's a
umask you need to INVERT that to figure out how it turns into an actual
permission string. That makes it xxxx-x---.

Submit
8. You work as network administrator at Certkiller .com. A user moved to another
department within Certkiller .com. Which command would you use to change the group
ownership of her files and directories? (fill in the blank - only the command without
arguments or options):

Explanation

chown command change user and group ownership on file or
directory. Similalrly you can change the group ownership using the chgrp
command.
#chown userowner.groupowner file
#chown -R userowner.groupowner directory : This method is called recursively, it
changes the ownership of directory as well as all the conetents of directory.
#chgrp groupowner filename/directory

Submit
9. You wish to copy the entire contents of the /dev/hda1 to /dev/hdb1 block by block.
Type in the simplest command that would do this?

Explanation

dd command , which creates the disk image, the above command
cratest the image of /dev/hda1 and transfer into /dev/hdb1.
Similarly dd if=diskboot.img of=/dev/sda1 : Which creates the image of diskboot.img
and writes into /dev/sda1.

Submit
10. You are the root user of a system, and need to gather quota information about all
users on the system. Type the command along with any options and arguments to
accomplish this.

Explanation

repquota command displays the quota report of particular filesystem.
#repquota /home : Which reports the information of quota on /home

Submit
11. You are building that what will be a busy email and web server. You have plenty of
space on a hardware RAID device. You are concerned about heavy log activity
causing problems. Which directory should you give its own partition?

Explanation

/var/spool/mail is the user's mail spooling directory and /var/www is
the directory used by the http service. So /var/ shoul in different partitions.

Submit
12. A file named  Certkiller1 is set with the following ownership:
            Owner = bla
            Group =  blub
You want to change this file's ownership to be totally owned by foo and group bar, what
command string will accomplish this?

Explanation

chown [-hHLPR] [[user]] [:group] target1 [[target2 ..]]

Submit
13. Which chown command will change the ownership to foo and the
group to bar on a file named biglist?

Explanation

chown command is used to change the user owner and group owner of
file or directory.
Syntax: chown user:group file/directory
OR
chown user.group file/directory

Submit
14.   What file must be put in the root of a filesystem for quotas to be enabled for users?

Explanation

aquota.user is the quota information file as well as aquota.group is the
group quota information file, which files required to create in root filesystem.

Submit
15. To prevent users from being able to fill up the / partition, the _________ directory
should be on a separate partition if possible because it is world writeable.

Explanation

If you haven't mounted the /var in different partition, it uses the space
from / parititions and /var has the world writable permission means others also can
write the files in /var/ so whenever others creates files it occupied space from /.

Submit
16. Type the command and argument that would cause the default permissions on
newly created files to be set as:
rw- r-- r--

Explanation

umask is the command which display as well as set the default
permission.
First examine the given permission:
rw- for owner user : 6
r-- : for owner group member :4
r-- : for others: 4
It means total permission is 644
Now to set 644 default permission into file needs to subtract from 666
666
644
022
#umask 022

Submit
17. What does the command mount -a do?

Explanation

mount command lists all mounted file system. -a option is used to
mount all file system written in /etc/fstab.

Submit
18. Before you start creating directories on a newly created file system, what should you do?

Explanation

According to the technical information available at Linux From
Scratch Ver 3.0, Before we start creating directories, we need to check the base
system's umask setting. To do this, we run umask. The result should be 022. If it
isn't, then run the following command to ensure that the directories will be created
with the correct permissions:
umask 022

Submit
19. A base Linux system's umask setting should be default to:

Explanation

There are two different default umask value one for root user and
another is for non-root user.
022 umask is for root user and 002 for the non-root user. It is defined globally in
/etc/bashrc file.

Submit
20. To allow a regular user account to mount and unmount a filesystem (for instance, a
cdrom or floppy), which option will need to be added to the corresponding line in         
/etc/fstab?

Explanation

Answer C is correct. user options is used to allow an ordinary user to
mount the file system. The name of the mounting user is written to mtab so that
user can unmount the file system again.

Submit
21. What TWO permissions must a user have in order to run a shell script?

Explanation

To execute the shell scripts required permission is read and execute.
#chmod a+x test.sh : Which sets the execute permission on test.sh file.

Submit
22. After creating a new file, you notice that the permissions of the new
file are -rw-rw-rw-. From this, you know that the value of the umask is
what?

Explanation

Files umask value is 6 because normal file created using the text editor
do not have execute permission.
Maximum Permission to file 666
Applied Permission to file 666
Unmask value is -----
000

Submit
23. How can you generate a report on the disk usage and quotas for all filesystem which
are defined in /etc/mtab to be read-write with quotas?

Explanation

repquota prints a summary of the disk usage and quota for the
specified filesystem. For each user the current number of files and amount of space
is printed along with any quotas created with edquota.
Example: repquota /home : whch prints the quota information on /home.

Submit
24. If you set the umask to 022, by default what permissions will your files have?

Explanation

umask is the command which display as well as set the default
permission.
When set the umask 022 then permission on files :
666
022
644
It means rw-r--r-- permission will set on files and
777
022
755
rwxr-xr-x permission will set on directory.

Submit
25. How can you set the SGID on a file called Certkiller examinator?

Explanation

Like files or directories, process also runs under the some ownership.
By default process start under the ownership of executer. Means who is going to
execute the command, process start under the ownership or security context of that
user or group. When SUID or SGID bit is set the executable file, process starts
under the security context of file owner then executer.
#chmod u+s file : which sets SUID bit on file
#chmod u+g file : Which sets SGID bit on file.

Submit
26. When you create a new file, the permissions show as 654. What value is the umask
likely set at?

Explanation

The new permission is 654 to set this permission umask should set:
666
654
012
#umask 012
When set the umask 012 the permission will be 654 on file.

Submit
27. You are using quota on your system. How can you see disk quota details?

Explanation

repquota prints a summary of the disk usage and quotas for the
specified file systems. For each user the current number of files and amount of
space (in kilobytes) is printed, along with any quotas created with edquota.
Example : repquota /home à prints the summary of disk usage and other information of
all users.

Submit
28. Where is the quota information for users of volume /home stored?

Explanation

Steps of configure the quota
7. mount the partition using usrquota , grpquota option eg
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 1 in fstab then reboot or
remount the filesystem
#mount -o remount /home
8. Create the quota Information file
#touch /home/aquota.user
#touch /home/aquota.group
9. Initialize the quota database
#quotacheck -ug /home
10. Enable the quota
#quotaon -ug /home
11. Apply the quota policy
#edquota -u user1 /home
12. Monitor the quota
#quota username
#repquota /home
aquota.user is the quota information file as well as aquota.group is the group quota
information file.

Submit
29. Which shown command will change the ownership to 'Certkiller' and the group to file 'list'?

Explanation

chown [-hHLPR] [[user]] [:group] target1 [[target2 ..]]

Submit
30. Two directories require different quota for file system usage. The /var/mail
directory needs a 20MB quota, and the /home directories require a 40MB quota.
What must be true about these directories?

Explanation

We can apply the quota policy on per paritions basis. If different
quota policy is required then needs to create the different partitions.

Submit
31. What two things does the /etc/fstab file contain references to?

Explanation

All filesystems written in /etc/fstab mount automatically at boot

time.
Syntax of /etc/fstab:
Device mountpoint filesystem mounting options dump frequency fsck order
LABEL=/ / ext3 defaults,acl 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=SWAP-hda13 swap swap defaults 0 0
/dev/hda14 /test ext3 defaults,acl 0 1
/dev/hda15 swap swap defaults 0 0
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0

Submit
32. Which is a valid /etc/fstab entry

Explanation

All filesystems written in /etc/fstab mount automatically at boot time.
Syntax of /etc/fstab:
Device mountpoint filesystem mounting options dump frequency fsck order
LABEL=/ / ext3 defaults,acl 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=SWAP-hda13 swap swap defaults 0 0
/dev/hda14 /test ext3 defaults,acl 0 1
/dev/hda15 swap swap defaults 0 0
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
to mount the nfs shared
Server:shared directory path mountpoint filesystem mounting point dump frequency fsck
order.

Submit
33. You have the following file:
           -rwxrwxr-x 1 foo root 0 Feb 23 07:48 /bin/foo
Which of the following commands will change the owner of the file /bin/foo from the
foo user to the bar user without affecting group ownership?

Explanation

chown [-hHLPR] [[user]] [:group] target1 [[target2 ..]]

Submit
34. If a file is symlinked to with a link name of file2, and that file is deleted, what
happens to the contents of the file?

Explanation

The symlink itself is only a pointer to the original file. If that file is deleted the pointer will point at an empty space.

Submit
35. Which option must be listed in /etc/fstab to activate user quotas automatically?

Explanation

To implement quota in partitions, we should mount with usrquota for
user quota, grpquota for group quota.
Example of mounting /home using usrquota and grpquota options.
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2

Submit
36. Which entry in /etc/fstab will allow any user to mount and
unmount /dev/cdrom?

Explanation

All filesystems written in /etc/fstab mount automatically at boot time.
Syntax of /etc/fstab:
Device mountpoint filesystem mounting options dump frequency fsck order
LABEL=/ / ext3 defaults,acl 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=SWAP-hda13 swap swap defaults 0 0
/dev/hda14 /test ext3 defaults,acl 0 1

/dev/hda15 swap swap defaults 0 0
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
user : allow a user to mount
Owner : allow device owner to mount
Pamconsole : allow a user at the console to mount

Submit
37. A user named Certkiller needs to execute a system script file. What rights do the
user need to execute a script file?

Explanation

rwx for everyone is a bit overkill, execute only will not be enough as
you can't access the file in that case. Read only for user will prohibit you from
executing it. So in the end you need both Read and Execute permission in the same
permission set.

Submit
38. When you create a new directory, you see the permissions are set to 600. What
umask value would cause this to happen?

Explanation

The new permission is 600, to set this permission umask should set:
777
-600
177
# umask 177
When umask set 177 the permission on directory will be 600.

Submit
39. Which command will print out the attributes of the file foobar?

Explanation

lsattr - list file attributes on a Linux second extended file system

Submit
40. What is the proper option to put in /etc/fstab to enable user quotas for particular partition?

Explanation

Usrquota enables the user quota accounting and limits according to the policy of
administrator.
Example:
LABEL=/home /home ext3 defaults,usrquota 1 1

Submit
41. Which of the following commands is run last during boot on a system
With quotas enabled?

Explanation

quotaon announces to the system that disk quotas should be enabled
on one or more filesystems. The filesystem quota files must be present in the root
directory of the specified filesystem and be named either aquota.user (for version 2
user quota), quota.user (for version 1 user quota), aquota.group (for version 2
group quota), or quota.group (for version 1 group quota).

Submit
42. What would the following line accomplish if run as root?
chown -R bert /home/bert/*

Explanation

-R Recursively change file user and group IDs. For each file operand that names a
directory, chown shall change the user ID (and group ID, if specified) of the directory
and all files in the file hierarchy below it. Unless a -H, -L, or -P option is specified, it is
unspecified which of these options will be used as the default.

Submit
43.  What are the default permissions for the Red Hat /etc/passwd file?

Explanation

Default permission of /etc/passwd file in redhat enterprise linux is 644.
-rw-r--r-1 root root 3530 Aug 29 12:43 /etc/passwd

Submit
44. Your unmask is set to 002. If you create a new file, what will the permission of the
new file be?

Explanation

The given correct answer is "-rw-rw-r--". In UNIX/Linux systems, file permissions are represented by a 10-character string. The first character represents the file type, in this case, a regular file denoted by "-". The next three characters "rw-" indicate that the owner of the file has read and write permissions. The following three characters "rw-" indicate that the group members have read and write permissions. The last three characters "r--" indicate that others have only read permission. Therefore, if the unmask is set to 002, the new file will have permissions -rw-rw-r--.

Submit
45. Which of the following commands makes /bin/foo executable by everyone but only
writable by its owner?

Explanation

chmod 755 ecuals xxx x-x x-x meaning rwx, rx, rx.

Submit
46. On boot you see an error message indicating that line 18 of /etc/fstab
is bad. Looking at it shows:
/dev/fdO /mnt/ floppy auto auto, user 0 0
Why is there an error?

Explanation

Here is the line of /etc/fstab
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
auto filesystem is used for removable media so it can't use in mounting option. So
Answer B is correct.

Submit
47. You have just added a CD-ROM drive (/dev/hdd) to your system and have added it
to your fstab. Typically you can use which of the following commands to mount
media in that drive to /mnt/cdrom?

Explanation

/mnt/cdrom or /media/cdrom is the mount point for cdrom specified in /etc/fstab.
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
So we need to mount just typing mount /media/cdrom command.

Submit
48. You changed umask to prevent access to your files by others. Now
you realize that another user has read a document that you wrote 2
weeks ago. Which of the following statements is correct?

Explanation

umask command is used to set the default permission to new file or
directory. It will not change the permission of already created files/directories.
To change the Permission of already created files/directories, should chmod command.

Submit
49. What are the default permissions on the Red Hat /etc/shadow file?

Explanation

The default permission of /etc/shadow file in Redhat Enterprise Linux
is 400 means only the root user can read the file.
-r--------1 root root 3530 Aug 29 12:43 /etc/passwd

Submit
50. Which of the following commands will list the quota for the user foobar?

Explanation

quota - display disk usage and limits. Quota displays user's disk usage
and limits. By default only the user quotas are printed.
Either quota -u username
Or
quota username
To display group quota:
quota -g groupname

Submit
51. You need to alter the permissions on the directory /home/mrbill and all it's
contents to match the following permissions.
            drwxr--r--
Which of these commands with options and arguments will accomplish this? Choose
two.

Explanation

We can change the permission of file or directory using the chmod
command either using sumbolic method or numeric method.
Permission categories
u : Owner user
g : Owner Group
o : others
a : all
Permission types:
r : Read only : Numeric Value 4
w : Write : Numeric Value 2
x : Execute : Numeric Value 1
#chmod g+rwx filename : Which sets the read, write and execute permission to owner
group member on file.
#chmod 777 filename : Which sets the read, write and execute permission to all
-R option is called recursive, when you use this option in directory it changes the
permission to all the contents of directory.

Submit
52. In which file are you likely to find the global setting for the umask and ulimit?

Explanation

Default umask is specified in /etc/bashrc file for root user and
non-root user. For root user 022 is the default umask and 002 is for the non-root
user.

Submit
53. You want to configure user quotas for the /home filesystem. You've installed the
quota packages. What else needs to be done to enable the filesystem's quotas?
Choose all that apply.

Explanation

Steps of configure the quota
1. mount the partition using usrquota , grpquota option eg
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 1 in fstab then reboot or
remount the filesystem
#mount -o remount /home
2. Create the quota Information file
#touch /home/aquota.user
#touch /home/aquota.group
3. Initialize the quota database
#quotacheck -ug /home
4. Enable the quota
#quotaon -ug /home
5. Apply the quota policy
#edquota -u user1 /home
6. Monitor the quota
#quota username
#repquota /home

Submit
54. What is the purpose of setting the SUID? Choose all that apply.

Explanation

Like files or directories, process also runs under the some ownership.
By default process start under the ownership of executer. Means who is going to
execute the command, process start under the ownership or security context of that
user or group. When SUID or SGID bit is set the executable file, process starts
under the security context of file owner then executer.
#chmod u+s file : which sets SUID bit on file
#chmod u+g file : Which sets SGID bit on file.

Submit
55. You want the default permissions for your files to be -rw-r----- .
HOW must you set umask?

Explanation

Total Permission 777
New Permission to set 740
Total Difference 037
umask 037 should set.

Submit
View My Results

Quiz Review Timeline (Updated): Apr 24, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Apr 24, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 13, 2009
    Quiz Created by
    Tobyyy
Cancel
  • All
    All (55)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which file contains information about filesystems and their respective...
What umask will set the file permissions on a newly created file to...
What command (with parameter[s]) would you type to mount all...
You have a floppy image called boot.img in your current working...
You are building a server that will have many hardware and operating...
What must be added to the following to enable group quotas for...
On a standard Linux system as a normal user, what umask value will...
You work as network administrator at Certkiller .com. A user moved to...
You wish to copy the entire contents of the /dev/hda1 to /dev/hdb1...
You are the root user of a system, and need to gather quota...
You are building that what will be a busy email and web server. You...
A file named  Certkiller1 is set with the following...
Which chown command will change the ownership to foo and thegroup to...
  What file must be put in the root of a filesystem...
To prevent users from being able to fill up the / partition, the...
Type the command and argument that would cause the default permissions...
What does the command mount -a do?
Before you start creating directories on a newly created file system,...
A base Linux system's umask setting should be default to:
To allow a regular user account to mount and unmount a filesystem (for...
What TWO permissions must a user have in order to run a shell script?
After creating a new file, you notice that the permissions of the...
How can you generate a report on the disk usage and quotas for all...
If you set the umask to 022, by default what permissions will your...
How can you set the SGID on a file called Certkiller examinator?
When you create a new file, the permissions show as 654. What value is...
You are using quota on your system. How can you see disk quota...
Where is the quota information for users of volume /home stored?
Which shown command will change the ownership to 'Certkiller' and the...
Two directories require different quota for file system usage. The...
What two things does the /etc/fstab file contain references to?
Which is a valid /etc/fstab entry
You have the following...
If a file is symlinked to with a link name of file2, and that file is...
Which option must be listed in /etc/fstab to activate user quotas...
Which entry in /etc/fstab will allow any user to mount andunmount...
A user named Certkiller needs to execute a system script file. What...
When you create a new directory, you see the permissions are set to...
Which command will print out the attributes of the file foobar?
What is the proper option to put in /etc/fstab to enable user quotas...
Which of the following commands is run last during boot on a...
What would the following line accomplish if run as root?chown -R bert...
 What are the default permissions for the Red Hat /etc/passwd...
Your unmask is set to 002. If you create a new file, what will the...
Which of the following commands makes /bin/foo executable by everyone...
On boot you see an error message indicating that line 18 of...
You have just added a CD-ROM drive (/dev/hdd) to your system and have...
You changed umask to prevent access to your files by others. Nowyou...
What are the default permissions on the Red Hat /etc/shadow file?
Which of the following commands will list the quota for the user...
You need to alter the permissions on the directory /home/mrbill and...
In which file are you likely to find the global setting for the umask...
You want to configure user quotas for the /home filesystem. You've...
What is the purpose of setting the SUID? Choose all that apply.
You want the default permissions for your files to be -rw-r----- .HOW...
Alert!

Advertisement