|
Posted by Matthew Augier \(dps\) on 03/18/06 16:57
Thanks David, I deleted all the files and changed teh ribbon creation
routine to chmod the file when it was created as 666, this looks like it has
worked!
As this is a shared host running the cron as root or sudo (new to me but
from what I can tell changes me as a used to root with passwrod) are two
options not open.
Mat
"David Haynes" <david.haynes2@sympatico.ca> wrote in message
news:IWCRf.41774$cm3.33127@fe65.usenetserver.com...
> Matthew Augier wrote:
>> Hey all
>>
>> I help out at a gaming website, where we play BF2 and track player
>> stats/give them awards etc. I've got a whole backend and everything works
>> exactly as I need... except for when I need to update the awards via cron
>> job. Then I'm getting a "imagepng(): Unable to open 'xxx.png' for writing
>> in XXX". All the paths are correct as it loads other images as part of
>> the process, and I belive it's a permission issue. The files are in a 777
>> folder and each file has the permission of 644 (User 65534, grou 65534) -
>> what am I doing wrong?
>>
>> (BTW tried different permissions, and if I delete the file the cron job
>> creates it, but then you can't access it via a http request)
>>
>> Many thanks
>>
>
> As I understand it:
>
> cron runs as the effective user id of the name of the crontab file.
> e.g. if you have a crontab file named 'foo', then crontab will run as the
> effective user 'foo'.
>
> I say 'effective user' since if there are two accounts, say 'foo' and
> 'bar', and both have a userid of 1234 and 'bar' is located ahead of 'foo'
> in the /etc/passwd file, then cron will run as 'bar' even though the
> crontab file is named 'foo'.
>
> That aside, I think your issue is that the effective user cron is running
> your job as is not able to write the file. (i.e. it is not running as user
> 65534).
>
> Solutions:
> 1. run the cron job as user 65534.
> 2. run the cron job and sudo to userid 65534
> 3. open the permissions on xxx.png to 666
>
> -david-
>
Navigation:
[Reply to this message]
|