nerdexam
GIAC

GSEC · Question #17

Your software developer comes to you with an application that controls a user device. The application monitors its own behavior and that of the device and creates log files. The log files are…

The correct answer is A. /var/log. On Linux systems, log files should be stored in /var/log, the standard location for variable log data per the Filesystem Hierarchy Standard (FHS).

Operating System Security

Question

Your software developer comes to you with an application that controls a user device. The application monitors its own behavior and that of the device and creates log files. The log files are expected to grow steadily and rapidly. Your developer currently has the log files stored in the /bin folder with the application binary. Where would you suggest that the developer store the log files?

Options

  • A/var/log
  • B/etc/log
  • C/usr/log
  • D/tmp/log
  • E/dev/log

How the community answered

(58 responses)
  • A
    81% (47)
  • B
    2% (1)
  • C
    10% (6)
  • D
    5% (3)
  • E
    2% (1)

Why each option

On Linux systems, log files should be stored in /var/log, the standard location for variable log data per the Filesystem Hierarchy Standard (FHS).

A/var/logCorrect

/var/log is the designated directory for log files on Linux as defined by the Filesystem Hierarchy Standard. The /var directory is designed for variable data - files whose content changes continuously during system operation. Placing rapidly growing log files here ensures proper system organization and compatibility with log management tools like logrotate.

B/etc/log

/etc is reserved for system configuration files and is not intended for storing log data.

C/usr/log

/usr contains read-only user programs and shared data, making it inappropriate for dynamic, continuously growing log files.

D/tmp/log

/tmp stores temporary files that may be purged on reboot or by system cleanup processes, making it unreliable for persistent application logs.

E/dev/log

/dev/log is a Unix domain socket used by syslog to receive log messages, not a directory for storing log files.

Concept tested: Linux Filesystem Hierarchy Standard log directory

Source: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s10.html

Topics

#Linux filesystem hierarchy#/var/log#log file storage#FHS

Community Discussion

No community discussion yet for this question.

Full GSEC Practice