Tuesday, November 18, 2025

/var/permission

 

from link, /var/mail should have correct permissions 2775 root:mail

The first digit "2" represents the setgid (Set Group ID) special permission:

  • 2 = setgid bit enabled
  • When set on a directory, new files created within inherit the directory's group ownership
  • This ensures all mail files created in /var/mail automatically belong to the mail group

The s represents the setgid bit. It appears in the group execute position:
  • Normal group permissions: rwx (read, write, execute)
  • With setgid: rws (read, write, setgid)
  • With setgid but no execute: rwS (capital S)

No comments: