0

I am attempting to download a folder where it has 777 permissions as well as its subfolders, but when I try to use get in ftp, It brings back the error:
550 Failed to open file

Iv'e checked the permissions:

ubuntu@ubuntu:~/sourceDev/7-1-15_asm/4$ ls -l
total 1748
-rwxrwxrwx 1 ubuntu ubuntu     164 Jul  5 09:21 brianThread.hpp
-rwxrwxrwx 1 ubuntu ubuntu 1741092 Jul  5 09:21 brianThread.hpp.gch
-rwxrwxrwx 1 ubuntu ubuntu    9239 Jul  3 13:58 brianThread.so
-rwxrwxrwx 1 ubuntu ubuntu    9147 Jul  5 09:48 main
-rwxrwxrwx 1 ubuntu ubuntu     236 Jul  5 19:46 main.cpp
-rwxrwxrwx 1 ubuntu ubuntu    9147 Jul  5 19:46 main.out
ubuntu@ubuntu:~/sourceDev/7-1-15_asm/4$ cd ..
ubuntu@ubuntu:~/sourceDev/7-1-15_asm$ ls
1  2  3  4  5
ubuntu@ubuntu:~/sourceDev/7-1-15_asm$ cd ..
ubuntu@ubuntu:~/sourceDev$ ls -l
total 4
drwxrwxrwx 7 ubuntu ubuntu 4096 Jul  3 13:59 7-1-15_asm
ubuntu@ubuntu:~/sourceDev$ cd *
ubuntu@ubuntu:~/sourceDev/7-1-15_asm$ ls -l
total 20
drwxrwxrwx 2 ubuntu ubuntu 4096 Jul  3 16:59 1
drwxrwxrwx 2 ubuntu ubuntu 4096 Jul  2 16:49 2
drwxrwxrwx 2 ubuntu ubuntu 4096 Jul  3 05:06 3
drwxrwxrwx 2 ubuntu ubuntu 4096 Jul  5 19:46 4
drwxrwxrwx 2 ubuntu ubuntu 4096 Jul  3 14:00 5

Here's what I've tried to copy the files:

ftp> cd 7-1-15_asm
250 Directory successfully changed.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxrwxrwx    2 1000     1000         4096 Jul 03 16:59 1
drwxrwxrwx    2 1000     1000         4096 Jul 02 16:49 2
drwxrwxrwx    2 1000     1000         4096 Jul 03 05:06 3
drwxrwxrwx    2 1000     1000         4096 Jul 05 19:46 4
drwxrwxrwx    2 1000     1000         4096 Jul 03 14:00 5
226 Directory send OK.
ftp> get 4
local: 4 remote: 4
200 PORT command successful. Consider using PASV.
550 Failed to open file.
ftp> get 4 /home/brian
local: /home/brian remote: 4
200 PORT command successful. Consider using PASV.
550 Failed to open file.
ftp>

What am I doing wrong that prevents me from copying a folder from the ftp server to my computer. Both of the computers are on the same network.

In a summary I want to know how to copy /home/ubuntu/sourceDev/7-1-15_asm/4 (which is a folder) and its contents from the computer with the ftp server to the computer issuing the ftp command. Also what are the minimum permissions I can have on a folder and its contents, while it being still possible to copy it to another computer using the ftp command?

0

FTP clients aren't particularly good at downloading whole directories.

Try using wftp with its useful "-r" option. "-l 0" ensures it isnt limited to 5 levels of directory.

wget -r -l 0 ftp://user:pass@server.com/7-1-15_asm/4
0

The error message relates to your_local_ filename. You are trying to download 4 to the target /home/brian. However that target already exists - it's a directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.