Weird permissions for new created files and folders (SFTP)
I know there is
pam_umask that controls permissions for newly created files and folders. The default settings are active in
/etc/login.defs (umask 022) and
pam_umask is activated using the file
umask 022 effects, that new files have permissions of
644 and folders
But something is weird there. When I connect via SFTP, new folders have a permission of
775 (umask 002) and new files the default
644 (umask 022).
Why do they have different permissions? Is there a way to configure different default permissions for files and folders? But I changed nothing of the default configuration and my
.profile is untouched.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.