{"description": "All directories in local partitions which are world-writable should be owned by root.\nIf any world-writable directories are not owned by root, this should be investigated.\nFollowing this, the files should be deleted or assigned to root user.", "rationale": "Allowing a user account to own a world-writable directory is undesirable because it allows the\nowner of that directory to remove or replace any files that may be placed in the directory by\nother users.", "severity": "medium", "references": {"srg": ["SRG-OS-000480-GPOS-00227", "SRG-OS-000138-GPOS-00069"], "anssi": ["R54"]}, "control_references": {"anssi": ["R54"]}, "components": [], "identifiers": {}, "ocil_clause": "there are world-writable directories not owned by root", "ocil": "The following command will discover and print world-writable directories that\nare not owned by root. Run it once for each local partition <i>PART</i>:\n<pre>$ sudo find <i>PART</i> -xdev -type d -perm -0002 -uid +0 -print</pre>", "oval_external_content": null, "fixtext": "Configure all public directories to be owned by root or a system account to prevent unauthorized and unintended information transferred via shared system resources.\n\nSet the owner of all public directories as root or a system account using the command, replace \"[Public Directory]\" with any directory path not owned by root or a system account:\n\n$ sudo chown root [Public Directory]", "checktext": "", "vuldiscussion": "", "srg_requirement": "All Ubuntu 22.04 world-writable directories must be owned by root, sys, bin, or an application user.", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "All Ubuntu 22.04 world-writable directories must be owned by root, sys, bin, or an application user.", "vuldiscussion": "If a world-writable directory is not owned by root, sys, bin, or an application user identifier (UID), unauthorized users may be able to modify files created by others.\n\nThe 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.", "checktext": "Verify that world writable directories are owned by root, a system account, or an application account with the following command. It will discover and print world-writable directories that are not owned by root.  Run it once for each local partition [PART]:\n\n$ sudo find  PART  -xdev -type d -perm -0002 -uid +0 -print\n\nIf there is output, this is a finding.", "fixtext": "Configure all public directories to be owned by root or a system account to prevent unauthorized and unintended information transferred via shared system resources.\n\nSet the owner of all public directories as root or a system account using the command, replace \"[Public Directory]\" with any directory path not owned by root or a system account:\n\n$ sudo chown root [Public Directory]"}}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": [], "cpe_platform_names": [], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Ensure All World-Writable Directories Are Owned by root User", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/permissions/files/dir_perms_world_writable_root_owned/rule.yml", "template": null}