documentation_complete: true

prodtype: rhel7

title: 'All User Files and Directories In The Home Directory Must Be Owned By The Primary User'

description: |-
    Change the owner of a interactive users files and directories to that
    owner. To change the of a local interactive users files and
    directories, use the following command:
    <pre>$ sudo chown -R <i>USER</i> /home/<i>USER</i></pre>

rationale: |-
    If local interactive users do not own the files in their directories,
    unauthorized users may be able to access them. Additionally, if files are not
    owned by the user, this could be an indication of system compromise.

severity: medium

identifiers:
    cce: 80533-3

references:
    disa: 366
    nist: ""
    srg: SRG-OS-000480-GPOS-00227
    stigid: "020660"

ocil_clause: 'the user ownership is incorrect'

ocil: |-
    To verify all files and directories in interactive users home directory
    are owned by the user, run the following command:
    <pre>$ sudo ls -lLR /home/<i>USER</i></pre>
