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

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?

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

报告相同问题?