php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31823 ftp_rawlist doesn't return file owner
Submitted: 2005-02-03 03:42 UTC Modified: 2005-02-21 19:56 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hellfire at fastq dot com Assigned:
Status: No Feedback Package: FTP related
PHP Version: 4.3.10 OS: solaris 8
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-02-03 03:42 UTC] hellfire at fastq dot com
Description:
------------
On Solaris 8 with php 4.3.10-5.03 when you try to use the ftp_rawlist command against a wuftpd server version wu-2.6.2 doesn't return the file owner.

bash-2.03# ./ftptest.php
array(5) {
  [0]=>
  string(9) "total 142"
  [1]=>
  string(55) "-rw-r--r--   1 other      14162 Jan 31 16:37 Hawaii.pdf"
  [2]=>
  string(57) "-rw-r--r--   1 other       4595 Feb  1 12:04 Podholes.txt"
  [3]=>
  string(72) "-rw-r--r--   1 other      51370 Feb  1 12:18 ReactionPaperGuidelines.pdf"
  [4]=>
  string(54) "drwxr-xr-x   2 other        512 Feb  2 09:45 juliotest"
}

If I run the code against a vsftpd server i get the file owner reported.

bash-2.03# ./ftptest.php
array(1) {
[0]=>
  string(65) "drwxr-xr-x    5 1000     100          1912 Jan 25 01:27 Documents"
}


I verified that this isn't a wuFTPD issue
ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 1093912
drwxr-xr-x   4 bobdobbs its          512 Dec 21 12:48 CA
-rw-r--r--   1 root     root     15156736 Jan 13 15:28 UHFreeradius-1.01.sol8

Notice the file owner is listed I started wi wuftpd2.6.1 but updated to wuftp 2.6.2 to see if it was an wuftp issue but it appears to only be a php issue.  I verified this against multiple Solaris 8 wuftp servers they all seem to give the same results.

-Aaron Collins
Developer for the University of Hawaii

Reproduce code:
---------------
#!/usr/local/bin/php
<?php
$ftp_server = "localhost";
$ftp_user_name = "bobdobbs";
$ftp_user_pass = "***";
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$buff = ftp_rawlist($conn_id, '');
ftp_close($conn_id);
var_dump($buff);
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-03 04:27 UTC] sniper@php.net
Are you sure doing 'ls -l' in your ftp client actually issues LIST command? 

I tested your script againts my ISP's ftp server and it works just fine.

 [2005-02-03 04:37 UTC] sniper@php.net
I also tried against the quite public and definately wuftpd:

<?php
$ftp_server = "ftp.wu-ftpd.org";
$ftp_user_name = "anonymous";
$ftp_user_pass = "foobar@example.com";
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$buff = ftp_rawlist($conn_id, '');
ftp_close($conn_id);
var_dump($buff);
?>

And again: it works just fine. (note: I'm using the latest stable snapshot. Get one from http://snaps.php.net/)

 [2005-02-21 19:56 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 26 14:01:24 2020 UTC