Other Articles

Servers – Configure Message of the Day (MOTD) Permissions

Support > Fixing Checks > Server

05 March, 2026

This check ensures that the permissions on the /etc/motd file are configured correctly. The Message of the Day (MOTD) is displayed to users after they successfully log in to the system.

Proper file ownership and permissions prevent unauthorized users from modifying the login message and displaying misleading or malicious information to authenticated users.

Check Details

  • Resource: Server
  • Check: Configure MOTD Permissions
  • Risk: If the /etc/motd file has incorrect ownership or permissions, unauthorized users may modify the message displayed to users after login.

Remediation Steps

  1. Open a terminal session on the server with root or sudo privileges.
  2. Verify the current ownership and permissions of the /etc/motd file.

    stat /etc/motd
    
  3. Ensure that the file ownership is set to root:root.

    chown root:root /etc/motd
    
  4. Set the correct file permissions so that the file is readable but not writable by other users.

    chmod 644 /etc/motd
    
  5. Verify that the final configuration matches the following requirements:

    • Owner: root
    • Group: root
    • Permissions: 644 (-rw-r--r--)

Note: On Container-Optimized OS, the /etc directory is stateless. Therefore, these configuration steps may need to be performed again after each system reboot.