SV-252955r958566_rule
V-252955
SRG-OS-000206-GPOS-00084
TOSS-04-020150
CAT II
10
Change the permissions of the file "/var/log/messages" to "0640" and the ownership of the file to "root" by running the following commands:
$ sudo chmod 0640 /var/log/messages
$ sudo chown root /var/log/messages
Change the permissions of the directory "/var/log/" to "0755" and the ownership of the directory to "root" by running the following commands:
$ sudo chmod 0755 /var/log/
$ sudo chown root /var/log/
Verify the "/var/log/messages" file has a mode of "0640" or less permissive and is owned by the root user with the following command:
$ sudo ls -l /var/log/messages
-rw-r----- 1 root root 59782947 Jul 20 01:36 /var/log/messages
If the "/var/log/messages" file has a mode more permissive than "0640", this is a finding.
If the "/var/log/messages" file is not owned by "root", this is a finding.
Verify the "/var/log" directory has a mode of "0755" or less permissive and is owned by the root user with the following command:
$ sudo ls -ld /var/log/
drwxr-xr-x 1 root root 1200 Jul 19 03:39 /var/log
If the "/var/log/" directory has a mode more permissive than "0755", this is a finding.
If the "/var/log/" directory is not owned by "root", this is a finding.
V-252955
False
TOSS-04-020150
Verify the "/var/log/messages" file has a mode of "0640" or less permissive and is owned by the root user with the following command:
$ sudo ls -l /var/log/messages
-rw-r----- 1 root root 59782947 Jul 20 01:36 /var/log/messages
If the "/var/log/messages" file has a mode more permissive than "0640", this is a finding.
If the "/var/log/messages" file is not owned by "root", this is a finding.
Verify the "/var/log" directory has a mode of "0755" or less permissive and is owned by the root user with the following command:
$ sudo ls -ld /var/log/
drwxr-xr-x 1 root root 1200 Jul 19 03:39 /var/log
If the "/var/log/" directory has a mode more permissive than "0755", this is a finding.
If the "/var/log/" directory is not owned by "root", this is a finding.
M
5469