Cpanel & Cron

Discuss Networking
Post Reply
agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Cpanel & Cron

Post by agent007 »

hi all,

My website is on a GNU/Linux server. It uses CPANEL v6 as a frontend to configure stuff etc....Now, I've submitted a CRON job to
periodically delete the mail box. Dont ask why!
rm -f /mail/website_address.org/007/inbox
The file refuses to get deleted...What could be the prob?

thanks.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

I'm not familiar with cpanel so I'll need a little more info. Can I assume "inbox" is owned by user "007" and I assume the cron job is running under 007's ID? Can I also assume that user 007 has permission to delete files from the /mail/website_address.org/007 directory? If so will the command in question work if user 007 executes it interactively? I assume that you want to periodically delete the contents of the file and not the file itself because more than likely there is a process that is just going to put put stuff in it (sendmail or whatever). Also, if there is a process running that has the file in quesiton open for write then you will not be able to delete it. What you *can* do is zero out the file:

$ cat /dev/null > /mail/website_address.org/007/inbox

or

$ echo -n > /mail/webzite_address.org/007/inbox

or

...

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 »

hi VoidMain,

Whenever I login via CPANEL or FTP, the

username = websiteaddress
passworfd = something

When I FTP to the site, the permissions on the files are shown as belonging to 'websiteaddress'...Now, I've created an e-mail account for 007..By creating the account, a mailbox gets created and SMTP authentication is given for 007.

When the CRON job is submitted, I dont think it has anything to do with 007....The CRON job will run as 'websiteaddress' not '007
' Am able to delete the file via FTP..

thanks.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

I guess you don't own the server in question? If not then I would have to suggest you ask this question to whoever set this thing up. As I said I don't know anything about CPanel (and don't really have any interest in knowing) so I would just be speculating. Sorry about that, maybe someone else here knows something about it (doubtful with the small number of users). You might also ask on the Linux Kung Fu forum:

http://arstechnica.infopop.net/OpenTopi ... f=96509133

Post Reply