All world-writable directories must be group-owned by root, sys, bin, or an application group.

From Canonical Ubuntu 16.04 Security Technical Implementation Guide

Part of SRG-OS-000480-GPOS-00227

Associated with: CCI-000366

SV-90263r2_rule All world-writable directories must be group-owned by root, sys, bin, or an application group.

Vulnerability discussion

If a world-writable directory has the sticky bit set and is not group-owned by a privileged Group Identifier (GID), unauthorized users may be able to modify files created by others.The only authorized public directories are those temporary directories supplied with the system or those designed to be temporary file repositories. The setting is normally reserved for directories used by the system and by users for temporary file storage, (e.g., /tmp), and for directories requiring global read/write access.

Check content

Verify all world-writable directories are group-owned by root, sys, bin, or an application group. Check the system for world-writable directories with the following command: # sudo find / -perm -2 -type d ! -group sys ! -group root ! -group bin -exec ls -lLd {} \; drwxrwsrwt 2 root whoops 4096 Jun 6 07:44 /var/crash drwxrwsrwt 2 root whoops 4096 Jul 19 2016 /var/metrics If any world-writable directories are not owned by root, sys, bin, or an application group associated with the directory, this is a finding.

Fix text

Change the group of the world-writable directories to root with the following command: # chgrp root

Pro Tips

Lavender hyperlinks in small type off to the right (of CSS class id, if you view the page source) point to globally unique URIs for each document and item. Copy the link location and paste anywhere you need to talk unambiguously about these things.

You can obtain data about documents and items in other formats. Simply provide an HTTP header Accept: text/turtle or Accept: application/rdf+xml.

Powered by sagemincer