LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices



Reply
 
Search this Thread
Old 08-03-2007, 01:23 PM   #1
xudonw1
LQ Newbie
 
Registered: Apr 2007
Location: london
Posts: 19

Rep: Reputation: 0
Unhappy question about Crontab


Hi guys

I setup few auto job through Cron, meanwhile It generate some logs when those auto job running. However those log's permission are 644 as default. By any chance that I could have those log with 664.
By the way, My umask is 0002 now.

for example

28 17 03 08 * touch /home/probatch/umasktest2.txt


after that the touch file's permission as you see
-rw-r--r-- 1 probatch progress 0 Aug 3 17:28 umasktest2.txt

I turely want it to be 664 for some reason.

Anyone can help?
 
Old 08-03-2007, 01:59 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,574

Rep: Reputation: 184Reputation: 184
"By any chance that I could have those log with 664."

Yes, you can use the chmod command to change the permissions. Make your chron command into a 2 command script:

touch /home/probatch/umasktest2.txt
chmod 664 /home/probatch/umasktest2.txt

----------------
Steve Stites
 
Old 08-07-2007, 04:47 PM   #3
xudonw1
LQ Newbie
 
Registered: Apr 2007
Location: london
Posts: 19

Original Poster
Rep: Reputation: 0
Thank you for your suggestion
well , those scripts are located in a live cluseters and logs will located in various place afterwards, also some of them will be Rsync into other boxes for some reason,, therefore chmod will not be a good idea to control all of them.
Any chance can get them in proper permisssion directly?
 
  


Reply

Tags
crontab, help


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crontab Question systemhackerz Red Hat 4 06-28-2006 01:02 AM
crontab question kaplan71 Linux - General 4 07-18-2005 05:04 PM
crontab question DriveMeCrazy Linux - Newbie 1 05-23-2004 01:25 PM
Crontab question mikeshn Linux - General 3 09-06-2003 07:26 PM
Crontab Question? f117bomb Linux - General 5 02-09-2002 08:28 PM


All times are GMT -5. The time now is 05:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration