Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-25-2011, 01:25 AM   #1
Registered: Dec 2010
Posts: 38

Rep: Reputation: 0
Red face problem in executing cron file ...

i have made a cron file in /etc/cron.d directory

i am appending a cron file in this directory through a jsp which is executed by tomcat .
The permissions of the file is made
-rwxrwxrwx 1 root root 462 2011-04-25 11:20 fi

and iam running this file through root
but its not executing
but on changing the permissions of the file to 644 the script starts executing.(why it is happening so?)

why the file stop excuting when its permissions are changed to 777
Old 04-25-2011, 01:52 AM   #2
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Since version xxx (cannot find the proper reference, right now) the cron daemon refuses to run crontab files that have execute permissions for the "other" part of the permission bits. This is due to a kernel bug discovered in the past, for which an external user could gain control by running a cron job which generated a core dump in /etc/cron.d directory. I leave the security concerns to real experts in this field, but I can confirm that the behaviour you've noticed is the default, despite it's poorly documented.

Edit: just found a brief reference here: My explanation was slightly incorrect: according to this article the permission bits are set to avoid the creation of the core dump inside /etc/cron.d (not necessarily from a cron job executed from /etc/cron.d itself).

Last edited by colucix; 04-25-2011 at 01:57 AM.
Old 04-25-2011, 02:19 PM   #3
Registered: Aug 2007
Posts: 133

Rep: Reputation: 16
It should also be noted that modifying systems files (/etc) via a a web server is extremely dangerous and considered bad form.


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
Problem executing scripts from cron. glore2002 Debian 6 10-01-2009 10:40 AM
problem executing file tamoneya Linux - Newbie 1 02-24-2008 08:02 PM
Problem in executing .run file (updating PB) Linux - Software 6 02-01-2008 01:48 PM
cron not executing yusufs Linux - Newbie 38 12-27-2007 05:01 PM
Cron not Executing PHP script Badnoodles Linux - General 2 10-25-2006 04:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:14 PM.

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