Operating System - HP-UX
1823471 Members
2351 Online
109660 Solutions
New Discussion юеВ

FTP from Unix to Windows: The system cannot find the path specified.

 
CRollins
Advisor

FTP from Unix to Windows: The system cannot find the path specified.

I get the following error message when trying to FTP a file that is there. The permissions are open and I cant figure out why we're getting this error. Is there a temporary directory that ftp is using? Please help.

Thanks.


$ ftp Server
Connected to server.
220 Server Microsoft FTP Service (Version 5.0).
Name (Server:NAME): login
331 Password required for login.
Password:
230 User login logged in.
Remote system type is Windows_NT.
ftp> asci
200 Type set to A.
ftp> ftp> put /home/path/file.txt
200 PORT command successful.
550 /home/path/file.txt: The system cannot find the path specified.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: FTP from Unix to Windows: The system cannot find the path specified.

Shalom,

Use the pwd command to see where you are.

The ftp server likely has your account in chroot jail wheer /home is configured as root.

lcd is used to set the local directory from which to upload

After login try this:

lcd c:\temp (wherever the file is)
put file.txt

ls -la or ls should work in the ftp interface as well.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor

Re: FTP from Unix to Windows: The system cannot find the path specified.

Does Microsoft FTP Service (Version 5.0) know
what a path like "/home/path/file.txt" means,
or is it looking for a path more like
"C:\home\path\file.txt"?

> Use the pwd command to see where you are.

Good idea.

> lcd c:\temp (wherever the file is)

Not such a good idea, when the FTP _client_
is on the UNIX system, and the _server_ is on
Windows. However, an appropriate LCD command
could be useful, for example:

lcd /home/path
put file.txt

as could a slightly more portable PUT, for
example:

put /home/path/file.txt file.txt
Bill Hassell
Honored Contributor

Re: FTP from Unix to Windows: The system cannot find the path specified.

The put command has two parameters: the source and the destination filename. Some (not all) ftp programs will default the destination (HP-UX is one) and so your command is really:

put /home/path/file.txt /home/path/file.txt

Doesn't make much sense to the destination computer since the slashes go the other way and /home (or \home) doesn't exist. You must specify exactly where you want the file to go *AND* the name. ftp will not accept a destination directory, only a filename, with or without a path.

So the error: The system cannot find the path specified.
came from Windows.


Bill Hassell, sysadmin
Dave La Mar
Honored Contributor

Re: FTP from Unix to Windows: The system cannot find the path specified.

Bith of the previous posts resolve your issue.
In the ftp job you can
lcd /home/path
put file.txt

OR

put /home/path/file.txt file.txt

Either checks out fine unix to windoze. As noted, on the windoze side the admin likely set up a default directory for the unix user to log into.

Now look at the perl versions of ftp to cover your error checking.

Regards,

-dl
"I'm not dumb. I just have a command of thoroughly useless information."
Steven Schweda
Honored Contributor

Re: FTP from Unix to Windows: The system cannot find the path specified.

> put /home/path/file.txt /home/path/file.txt
>
> Doesn't make much sense to the destination
> computer since the slashes go the other way

I wouldn't bet on it. Many non-UNIX FTP
servers accept a UNIX-like path
specification. Even HP's VMS FTP server,
which is pretty lame in many ways, can do it.
For the ultimate in RFC compliance, one
really should use a separate CD command for
every step in the hierarchy, but most servers
don't demand this.

> and /home (or \home) doesn't exist. [...]

Interesting. I have no idea what does or
does not exist on someone else's FTP server.