Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron .pl Permission denied 1

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
Hi
I have a .pl file on my server called "stats.pl"
its located here: "/home/luckdrag/public_html/steam/pstats/stats.pl"

the file has chmod 777

Im trying to use cron to load this file every morning.

when cron runs it sends me an overview email
the content of this email is:
Code:
/bin/sh: line 1: /home/luckdrag/public_html/steam/pstats/stats.pl: Permission denied

what am i doing wrong?
is ther another kind of "permissions" next to chmod that i am unaware off?

thanks

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Check you webserver app. public_html my not allow scripts to run in it. Do you have a cgi-bin? place it in there.

Hope that helps.

Chris Burger
 
i can run it without problem using a ssh command prompt...


I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
i login to the ssh as root. doesnt the cron run as root? how can i get the cron to run as root?

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
The cron job will run as the user who created the cron job. So probably as root. However there is a comand line promt to tell cron what user to run the program as. I don't think you need it because you probably created the cron job as root. I will look into this more, do not have an answer for ya now, sorry.

Chris
 
You shouldn't be running stuff like this as root.
set up your cron for the user-luckdrag
 
ok the cron is now running under the user luckdrag and it works :p

i suppose the server has some kind of setting on it that disables running crons as root perhaps.. (i didnt install the server my provider did it, i just (try to) use it :eek:)

Thanks for the tips.
Thomas


I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top