tobia.zanarella
tobia.zanarella

Reputation: 1266

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.

  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.

Upvotes: 3

Views: 1279

Answers (1)

Pavel
Pavel

Reputation: 4217

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?

Upvotes: 4

Related Questions