dongyukang7006 2011-04-14 06:06
浏览 36
已采纳

从cron运行时filesize函数失败

I get the below error when I run my scrip from cron

Warning: filesize() [function.filesize]: stat failed for /home2/sharingi/public_html/scrape/zip/dailydose/April_14_2011.zip in /home2/sharingi/public_html/scrape/zip/zip.php

However if I run the script from my browser it works fine. Some kind of a permissions problem?

  • 写回答

2条回答 默认 最新

  • dougang6821 2011-04-14 06:14
    关注

    It's probably an issue related to the user that your cron process runs under. Make sure that whatever cron runs as has permissions, since it's probably not the same user as your ssh account or the webserver account. You can probably figure out which user cron runs as by configuring cron to run the command whoami and email you the output.

    If you can't figure out how to make that work, you might try configuring cron to wget the public url that you know works. Don't forget to turn off the file saving, and set it to quiet mode, otherwise you'll get a lot of garbage from each run.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器