in reply to File Open Error = 13?

It appears that most of the answers in this thread are based on an invalid assumption. Looking at the source for the message() method (in the Net::Cmd source code), it doesn't return a local error and the number 13 doesn't appear to have anything to do with $! on the local host.

If it had been an error opening the local file, then the reaction would have been the following code from get() in Net::FTP source code:

carp "Cannot open Local file $local: $!\n";

So "File open error = 13" is the response coming back from the remote FTP server. 13 being the defined value for EACCES is common enough that it still might indicate "permission denied" but it would depend on whether the remote FTP server is actually reporting errno and what errno of 13 means on that system (not what your local system reports $! = 13 as being).

You might want to report $ftp->code(), a 3-digit status code that you can look up, for example, in http://help.globalscape.com/help/support/Error_Codes/FTP_Codes.htm.

- tye        

Replies are listed 'Best First'.
Re^2: File Open Error = 13? (remote)
by molson (Acolyte) on Oct 29, 2009 at 17:53 UTC
    Thanks tye, I used $ftp->code() and get a 553 error which means the file name is not allowed. The file name is "ALL2EXT". It does not have an extension, but I don't think perl cares, and I don't see anything wrong with the file name.

      I don't see how "$director­y.thedir" could expand to "ALL2EXT". In your example, it would expand to "the directory.thedir", which certainly might not be "allowed". You might want to dump the filename to make sure it is really what you think it is.

      - tye