LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-27-2005, 07:26 AM   #1
madsjakob
LQ Newbie
 
Registered: Jul 2003
Location: Copenhagen, Denmark
Distribution: Fedora Core 4
Posts: 11

Rep: Reputation: 0
crontab and umask


After changing the umask in /etc/bashrc and /etc/csh.cshrc from 022 to 002 I'd expect that my scripts would use the new umask. Well they do next time I log in and run them by hand. But the crontab seems to reject the new umask. I have tried to restart the demon. I have even tried to reboot the server. It still uses the old umask. Is there some place special I have to change the umask when running scripts from the crontab?

Thanks

/mj
 
Old 07-27-2005, 12:44 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
What exactly did you place in your /etc/bashrc file and shouldn't that be /home/user/.bashrc ? The default one to use for global setups is /etc/profile
 
Old 07-28-2005, 03:36 AM   #3
madsjakob
LQ Newbie
 
Registered: Jul 2003
Location: Copenhagen, Denmark
Distribution: Fedora Core 4
Posts: 11

Original Poster
Rep: Reputation: 0
Well I figured since the umask already being set in /etc/bashrc with following lines
Code:
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
    umask 002
else
    umask 022
fi
I might as well change the last umask entry to
Code:
umask 002
anyways the approach is working on other servers set up this way.

BTW all servers are installed with Fedora Core 4 Test (last test release as I recall) and just this one is behaving odd.

Thanks again

/mj
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Umask metallica1973 Linux - Software 4 11-27-2005 01:21 PM
umask trophy Linux - General 1 04-03-2004 01:17 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
Umask robyso Linux - Security 1 07-14-2003 02:33 PM
Umask def1014 Linux - Security 3 06-21-2002 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration