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?

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

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用