2

So I've been going through a really perplexing issue trying to decipher why my umask value is being applied differently depending on how I am creating new files in RHEL.

My goal is to have new files created with 664 permissions so that my group which contains other users can also edit the file.

I have tried editing:

/etc/profile
/etc/bashrc

with:

umask 002

I also tried editing:

/etc/pam.d/common-session
/etc/pam.d/sshd
/etc/pam.d/login

with:

session optional pam_umask.so umask=002

When I create a new file in an SSH terminal using touch the permissions are perfect 664 with the group being able to edit the file.

If I create a new file in a GUI editor such as Coda for Mac, the permissions on the file are 644. If I use that same Coda software and open up the ssh shell built in and touch a new file with the same account the permissions again are the correct 664.

Am I missing something with how to correctly configure umask for all types of users regardless of how the file is being created? (interactive or not?)

Edit: I got this fixed by finally realizing the files in the GUI were being created locally on the computer and then transferred with the bad permissions. I got it fixed by setting the rules in Coda to specify 664 for new files. Sorry!

Ryan
  • 21
  • 2

0 Answers0