If I do $ftp->get(/path/to/file) it gets it. But cwd'ing to the directory, and doing ls, returns a null list.
I think this has nothing to do with Net::FTP or any sort of mget or ls function. It has to do with how permissions are set on the particular directory on the ftp server.
There's a little trick that the ftp maintainer can play with directory permissions, to provide a certain amount of "access control" or "data security" for files in the given directory. On a unix system, you can do this to a directory:
which causes it to have permission (mode) flags like this: "rwxr-x--x", which means:chmod 751 some_directory
So, this sort of permission allows the ftp server to provide some data protection -- that is, to limit distribution to specific recipients -- because only the owner can put files in, and the only people that can get files are those in the owner's group, or else people who have been told exactly what file names to retrieve.
This is also commonly used on ftp "upload" directories, where anon.ftp users can "put" files -- here the permission would be "rwxrwx-wx": anybody can create files in the directory, but only owner and group can search for file names. If one anon.ftp user puts a file into such a directory, other anon.ftp users won't know it's there, unless they are told what the file name is by someone who knows.
(updated to fix grammar)
In reply to Re^3: "Net::FTP" missing "mget"
by graff
in thread "Net::FTP" missing "mget"
by GaijinPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |