简体   繁体   English

ftp_rawlist在ProFTPd服务器上返回false

[英]ftp_rawlist returns false on ProFTPd server

  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. 我在Linux服务器上有一个ProFTPd(在x86_64上的Debian Linux 6.0.7 Linux 2.6.32-042stab078.27上的ProFTPd版本1.33),它允许一些用户访问他们的主目录。

  2. I also have another FTP server on a Mac OS X Server. 我在Mac OS X Server上还有另一台FTP服务器。

If I use solution (2), I'm able to perform ftp_rawlist to have a raw list of all directories and files. 如果我使用solution(2),我可以执行ftp_rawlist以获得所有目录和文件的原始列表。

If I use solution (1), ftp_rawlist ALWAYS returns FALSE , even if the directory is not empty. 如果我使用solution(1), ftp_rawlist ALWAYS返回FALSE ,即使该目录不为空。

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. 我真的不能uderstand为什么我总是false的ProFTPd的。

I gave a look around internet and discovered that there were some bugs on that function, but on previous versions of PHP. 我浏览了一下互联网,发现该功能存在一些漏洞,但是在以前版本的PHP上。 I'm running PHP version 5.3.3-7+squeeze16 and there are no bugs reported for this version. 我正在运行PHP版本5.3.3-7 + squeeze16并且没有针对此版本报告的错误。

Try to use passive mode 尝试使用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? 如果您的FTP服务器位于firewall ,通常需要被动模式,您可以在此处阅读被动模式 - 主动和被动FTP之间有什么区别?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM