Five chmod Permission Traps That Catch Developers Out
Standard tutorials recommend chmod 755 and 644 without explaining the permissions they grant. On directories, the read, write and execute bits behave differently: read lists names, write creates or deletes entries, and execute allows traversal, so a directory set to 666 is readable but unusable. The author also highlights confusion around chmod's = and + operators, the capital X flag for applying execute only where appropriate, and how umask is applied. Misplaced digits can unintentionally set setuid or setgid bits, while redirected file creation can yield overly permissive modes such as 644 for SSH keys. The article recommends install -m 600 for sensitive files and suggests a chmod calculator for verifying modes.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in