Difference between revisions of "Troubleshoot FTP"
Line 13: | Line 13: | ||
'''Try to get a file with Linux:''' | '''Try to get a file with Linux:''' | ||
− | <pre>[administrator@D620 ~]$ ftp | + | <pre>[administrator@D620 ~]$ echo 'some text here to send later' > test.txt |
+ | |||
+ | [administrator@D620 ~]$ ftp | ||
ftp> open 10.0.0.3 | ftp> open 10.0.0.3 | ||
Connected to 10.0.0.3 (10.0.0.3). | Connected to 10.0.0.3 (10.0.0.3). | ||
Line 23: | Line 25: | ||
Remote system type is UNIX. | Remote system type is UNIX. | ||
Using binary mode to transfer files. | Using binary mode to transfer files. | ||
+ | ftp> ls | ||
+ | 227 Entering Passive Mode (10,0,0,3,215,158). | ||
+ | 150 Here comes the directory listing. | ||
+ | 226 Directory send OK. | ||
+ | ftp> ls | ||
+ | 227 Entering Passive Mode (10,0,0,3,164,57). | ||
+ | 150 Here comes the directory listing. | ||
+ | 226 Directory send OK. | ||
ftp> | ftp> | ||
+ | ftp> cd /images | ||
+ | 250 Directory successfully changed. | ||
+ | ftp> ls | ||
+ | 227 Entering Passive Mode (10,0,0,3,141,50). | ||
+ | 150 Here comes the directory listing. | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 10 03:38 Optiplex745WinXPconfiguredApril2015 | ||
+ | drwxrwxrwx 3 1001 1001 4096 Apr 29 00:52 Torrent_Data | ||
+ | -rwxrwxrwx 1 0 0 217 Apr 28 22:52 convertall.sh | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 10 03:39 dev | ||
+ | drwxrwxrwx 2 0 0 16384 Apr 07 01:58 lost+found | ||
+ | -rwxr-xr-x 1 0 0 43 Apr 29 01:06 movemp4.sh | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 08 00:59 postdownloadscripts | ||
+ | drwxrwxrwx 10 1001 1001 4096 Apr 29 02:35 video | ||
+ | 226 Directory send OK. | ||
+ | ftp> clear | ||
+ | ?Invalid command | ||
+ | ftp> exit | ||
+ | 221 Goodbye. | ||
+ | [administrator@D620 ~]$ clear | ||
+ | �[3;J | ||
+ | [administrator@D620 ~]$ ftp | ||
+ | ftp> open 10.0.0.3 | ||
+ | Connected to 10.0.0.3 (10.0.0.3). | ||
+ | 220 (vsFTPd 3.0.2) | ||
+ | Name (10.0.0.3:administrator): fog | ||
+ | 331 Please specify the password. | ||
+ | Password: | ||
+ | 230 Login successful. | ||
+ | Remote system type is UNIX. | ||
+ | Using binary mode to transfer files. | ||
+ | ftp> cd /images | ||
+ | 250 Directory successfully changed. | ||
+ | ftp> ls | ||
+ | 227 Entering Passive Mode (10,0,0,3,204,176). | ||
+ | 150 Here comes the directory listing. | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 10 03:38 Optiplex745WinXPconfiguredApril2015 | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 10 03:39 dev | ||
+ | drwxrwxrwx 2 0 0 16384 Apr 07 01:58 lost+found | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 08 00:59 postdownloadscripts | ||
+ | 226 Directory send OK. | ||
+ | ftp> put test.txt | ||
+ | local: test.txt remote: test.txt | ||
+ | 227 Entering Passive Mode (10,0,0,3,132,59). | ||
+ | 150 Ok to send data. | ||
+ | 226 Transfer complete. | ||
+ | 29 bytes sent in 0.000114 secs (254.39 Kbytes/sec) | ||
+ | ftp> ls | ||
+ | 227 Entering Passive Mode (10,0,0,3,118,48). | ||
+ | 150 Here comes the directory listing. | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 10 03:38 Optiplex745WinXPconfiguredApril2015 | ||
+ | drwxrwxrwx 3 1001 1001 4096 Apr 29 00:52 Torrent_Data | ||
+ | -rwxrwxrwx 1 0 0 217 Apr 28 22:52 convertall.sh | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 10 03:39 dev | ||
+ | drwxrwxrwx 2 0 0 16384 Apr 07 01:58 lost+found | ||
+ | -rwxr-xr-x 1 0 0 43 Apr 29 01:06 movemp4.sh | ||
+ | drwxrwxrwx 2 0 0 4096 Apr 08 00:59 postdownloadscripts | ||
+ | -rw-r--r-- 1 1000 1000 29 Apr 30 00:29 test.txt | ||
+ | drwxrwxrwx 10 1001 1001 4096 Apr 29 02:35 video | ||
+ | 226 Directory send OK. | ||
+ | ftp> get test.txt | ||
+ | local: test.txt remote: test.txt | ||
+ | 227 Entering Passive Mode (10,0,0,3,190,81). | ||
+ | 150 Opening BINARY mode data connection for test.txt (29 bytes). | ||
+ | 226 Transfer complete. | ||
+ | 29 bytes received in 0.000529 secs (54.82 Kbytes/sec) | ||
+ | ftp> delete test.txt | ||
+ | 250 Delete operation successful. | ||
</pre> | </pre> | ||
Revision as of 00:31, 30 April 2015
Article currently under construction. Last updated 4-28-2015
When done, it'll look a whole lot like the "Troubleshoot TFTP" article in structure.
Contents
Testing FTP
Try to get a file with Linux:
[administrator@D620 ~]$ echo 'some text here to send later' > test.txt [administrator@D620 ~]$ ftp ftp> open 10.0.0.3 Connected to 10.0.0.3 (10.0.0.3). 220 (vsFTPd 3.0.2) Name (10.0.0.3:administrator): fog 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 227 Entering Passive Mode (10,0,0,3,215,158). 150 Here comes the directory listing. 226 Directory send OK. ftp> ls 227 Entering Passive Mode (10,0,0,3,164,57). 150 Here comes the directory listing. 226 Directory send OK. ftp> ftp> cd /images 250 Directory successfully changed. ftp> ls 227 Entering Passive Mode (10,0,0,3,141,50). 150 Here comes the directory listing. drwxrwxrwx 2 0 0 4096 Apr 10 03:38 Optiplex745WinXPconfiguredApril2015 drwxrwxrwx 3 1001 1001 4096 Apr 29 00:52 Torrent_Data -rwxrwxrwx 1 0 0 217 Apr 28 22:52 convertall.sh drwxrwxrwx 2 0 0 4096 Apr 10 03:39 dev drwxrwxrwx 2 0 0 16384 Apr 07 01:58 lost+found -rwxr-xr-x 1 0 0 43 Apr 29 01:06 movemp4.sh drwxrwxrwx 2 0 0 4096 Apr 08 00:59 postdownloadscripts drwxrwxrwx 10 1001 1001 4096 Apr 29 02:35 video 226 Directory send OK. ftp> clear ?Invalid command ftp> exit 221 Goodbye. [administrator@D620 ~]$ clear �[3;J [administrator@D620 ~]$ ftp ftp> open 10.0.0.3 Connected to 10.0.0.3 (10.0.0.3). 220 (vsFTPd 3.0.2) Name (10.0.0.3:administrator): fog 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /images 250 Directory successfully changed. ftp> ls 227 Entering Passive Mode (10,0,0,3,204,176). 150 Here comes the directory listing. drwxrwxrwx 2 0 0 4096 Apr 10 03:38 Optiplex745WinXPconfiguredApril2015 drwxrwxrwx 2 0 0 4096 Apr 10 03:39 dev drwxrwxrwx 2 0 0 16384 Apr 07 01:58 lost+found drwxrwxrwx 2 0 0 4096 Apr 08 00:59 postdownloadscripts 226 Directory send OK. ftp> put test.txt local: test.txt remote: test.txt 227 Entering Passive Mode (10,0,0,3,132,59). 150 Ok to send data. 226 Transfer complete. 29 bytes sent in 0.000114 secs (254.39 Kbytes/sec) ftp> ls 227 Entering Passive Mode (10,0,0,3,118,48). 150 Here comes the directory listing. drwxrwxrwx 2 0 0 4096 Apr 10 03:38 Optiplex745WinXPconfiguredApril2015 drwxrwxrwx 3 1001 1001 4096 Apr 29 00:52 Torrent_Data -rwxrwxrwx 1 0 0 217 Apr 28 22:52 convertall.sh drwxrwxrwx 2 0 0 4096 Apr 10 03:39 dev drwxrwxrwx 2 0 0 16384 Apr 07 01:58 lost+found -rwxr-xr-x 1 0 0 43 Apr 29 01:06 movemp4.sh drwxrwxrwx 2 0 0 4096 Apr 08 00:59 postdownloadscripts -rw-r--r-- 1 1000 1000 29 Apr 30 00:29 test.txt drwxrwxrwx 10 1001 1001 4096 Apr 29 02:35 video 226 Directory send OK. ftp> get test.txt local: test.txt remote: test.txt 227 Entering Passive Mode (10,0,0,3,190,81). 150 Opening BINARY mode data connection for test.txt (29 bytes). 226 Transfer complete. 29 bytes received in 0.000529 secs (54.82 Kbytes/sec) ftp> delete test.txt 250 Delete operation successful.
Try to get a file with Windows:
code here
FTP Service
Fedora 20/21
status/enable/restart
code here
Ubuntu
status/enable/restart
code here
FTP Settings File
Fedora:
Location:
code here
To display file:
code here
It should look a lot like this:
code here
To edit:
code here
Explanation of settings:
code here
Ubuntu:
Location:
code here
To display file:
code here
It should look a lot like this:
code here
To edit:
code here
Explanation of settings:
code here
Instructions on using Vi: Vi
Troubleshoot FTP
Troubleshooting here.
Disable/verify Firewall
Disable & Stop Firewall in Fedora 20/21
systemctl disable firewalld.service
systemctl stop firewalld.service
Can be undone with "start" and "enable".
Check Firewall in Fedora 20/21
systemctl status firewalld.service
Fedora 16
Add /bin/bash to /etc/shells as the vsftpd yum install does not do it correctly causing tftp timeout message
Check Firewall in Debian/Ubuntu
sudo iptables -L
If disabled, the output should look like this:
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
Disable Ubuntu Firewall
sudo ufw disable
Disable Debian Firewall
iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT
Temporarily disable Windows firewall
Change this picture to be specific to FTP.
Permissions
permissions for the /images directory