Problem: umask changes when new shell is created, despite what's in .cshrc

On linux... In my .cshrc, I have "umask 002" At the prompt I see 2...

% umask

I have a shell script...

#! /usr/bin/env tcsh

echo "umask in shell: "


Then I run it...

% a.csh
umask in shell:

Why isn't this just 2 ? Why did it change to 22?

  • I can't reproduce this on OpenBSD with tcsh 6.20.00. – Kusalananda Nov 1 '18 at 19:00
  • 1
    Run strace -f /path/to/your/tcsh-script and search for a call to umask, then search backward to see which file was recently opened. Might be /etc/cshrc, or /etc/csh.cshrc. – Mark Plotnick Nov 1 '18 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.