Just some umask notes (may expand over time and knowledge).

For files:

      umask
oct   oct dec    oct perms
666 - 027 (23) = 640 rw-r-----
666 - 002  (2) = 664 rw-rw-r--
666 - 111 (72) = 555 r-xr-xr-x
666 - 006  (6) = 660 rw-rw----
666 - 022 (28) = 644 rw-r--r--

For directories:

      umask
oct   oct dec    oct perms
777 - 027 (23) = 750 rwxr-x---
777 - 002  (2) = 775 rwxrwxr-x
777 - 111 (72) = 666 rw-rw-rw-
777 - 006  (6) = 771 rwxrwx--x
777 - 022 (28) = 755 rwxr-xr-x
42u 42u 42u
rwx rwx rwx

We might use the oct umask value for a specific user, e.g.

umask 022

We might use the dec umask value for sshd_config, e.g.

Match User sftptest
ForceCommand internal-sftp -u 28

About troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation