Exam LFCS All QuestionsBrowse all questions from this exam
Question 29

SIMULATION -

Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)

    Correct Answer:

    The world-writable directory that should be placed on a separate partition to prevent users from filling up the / filesystem is /tmp. The /tmp directory is used to store temporary files created by users and programs. Since it is world-writable, it can be a target for filling up disk space quickly. By placing /tmp on a separate partition, you can control its size and prevent it from impacting the root filesystem. For example, you can use a tmpfs filesystem to limit its size and ensure that it does not use disk space persistently.

Discussion
Buruguduystunstugudunstuy

/tmp is the world-writable directory that should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem. The /tmp directory is a world-writable directory that is used to store temporary files that are created by users and programs. It is a good idea to place /tmp on a separate partition, because it is often used to store large files and it is not cleaned up automatically. By placing /tmp on a separate partition, you can prevent users from being able to fill up the / filesystem by filling up /tmp. This is especially important if you have users who have the ability to create large files, or if you have programs that generate a lot of temporary files. For example: mount -t tmpfs -o size=4G tmpfs /tmp This mounts a tmpfs filesystem of size 4 GB at the /tmp mount point. Tmpfs is a filesystem that is stored in memory, and it is used to store temporary files. By mounting a tmpfs filesystem at /tmp, you can ensure that /tmp is always available and that it is not filling up the / filesystem.

Buruguduystunstugudunstuy

To make this change permanent, you can add the following line to the /etc/fstab configuration file: tmpfs /tmp tmpfs defaults,size=4G 0 0 This will mount the tmpfs filesystem at /tmp automatically during system startup.