dongmi1995 2015-01-30 20:56
浏览 30

无法创建〜/ .gnome2目录:权限被拒绝 - 使用Cron PHP和phpseclib进行警告

I running a PHP script with cron that uses phpseclib installed via composer (version 0.3.9). I'm using Net_SFTP to check an sFTP server for new files. Everything is working fine, but the script is generating this warning:

(process:16615): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied

The script is run by the apache user. The warning will show up even without doing a login. Just instantiating the Net_SFTP class will trigger this, and I only see it when ran from the cron job. Here is the code:

<?php
$host = 'my.sftp.server';
$test = new Net_SFTP($host);

The cron for apache is configured like this:

MAILTO=myEmail@example.com
*/10 * * * * /usr/bin/php /var/www/sftpCheck.php

The error appears from the stderr output when the cron script runs. Any ideas what this warning is and how I can correct it?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的
    • ¥15 r语言蛋白组学相关问题