Link to home
Start Free TrialLog in
Avatar of MichaelBalack
MichaelBalackFlag for Singapore

asked on

What is the default file and folder permissions for linux?

This is using SuSE Linux enterprise server 11 with SP3. There are few user accounts created. These users were used for application with ftp file transfer. Recently, found that the file and folder permissions were changed. If I remember correctly, the default umask should be 022, so as, the file created should be 644, and folder 755. However, files created by this user is more restricted with 600. I suspect the umask was changed was this user. btw, where to check and troubleshoot the problem?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What exactly are you trying to fix?  600 permissions still allow the user read and write access to the file.  They can manually change the permissions to be more permissive if they're the owner.  022 umask is a bit old school and allow too much permissions on any multiuser system.  077 is probably a better default starting umask.
Avatar of MichaelBalack

ASKER

Hi noci,

login as root,
check /etc/profile, found umask - 0022
check /etc/login.defs, found umask - 0022

logon as one of the affected user,
cd to the home directory, check .profile, and this is a soft symbolic link to else where. Found the umask was changed to 0077

Update this umask to 0022, get the user to logoff, and then logon again. Try upload a sample file, and found that the permission change back to 644. I have monitor for the file permissions for a couple of day.
Hi serialband,

6 for the owner is perfect. However, not only owner has to access this folder, other user, be the member of the group or others, also need to access to the folder with at least "read" permissions. So, in this case, 644 permissions are needed.
Thanks for expert noci in suggesting those files to check for default umask. It really help.