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条回答

    报告相同问题?

    悬赏问题

    • ¥15 vue3页面el-table页面数据过多
    • ¥100 vue3中融入gRPC-web
    • ¥15 kali环境运行volatility分析android内存文件,缺profile
    • ¥15 写uniapp时遇到的问题
    • ¥15 vs 2008 安装遇到问题
    • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
    • ¥15 找一个网络防御专家,外包的
    • ¥100 能不能让两张不同的图片md5值一样,(有尝)
    • ¥15 informer代码训练自己的数据集,改参数怎么改
    • ¥15 请看一下,学校实验要求,我需要具体代码