dtq7387 2013-07-22 14:07
浏览 142
已采纳

ftp_rawlist在ProFTPd服务器上返回false

  1. I have a ProFTPd on a linux server (ProFTPd version 1.33 on Debian Linux 6.0.7 Linux 2.6.32-042stab078.27 on x86_64) that lets access to some users to their home directories.

  2. I also have another FTP server on a Mac OS X Server.

If I use solution (2), I'm able to perform ftp_rawlist to have a raw list of all directories and files.

If I use solution (1), ftp_rawlist ALWAYS returns FALSE, even if the directory is not empty.

Users have permission to do anything they want inside their home directories on both servers (get directory listing, create and delete files, etc...). NO limits at all.

I really can't uderstand why I always get false on ProFTPd.

I gave a look around internet and discovered that there were some bugs on that function, but on previous versions of PHP. I'm running PHP version 5.3.3-7+squeeze16 and there are no bugs reported for this version.

  • 写回答

1条回答 默认 最新

  • dopnpoh056622 2014-02-20 19:35
    关注

    Try to use passive mode

    ftp_pasv($conn, true);
    

    Usually you need passive mode if your FTP server is behind firewall, what is passive mode you can read here - What is the difference between active and passive FTP?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗