• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Unable to retrieve file from ftp server

balanga

Daemon

Thanks: 68
Messages: 2,059

#1
I have set up ProFTP for anonymous ftp access but am unable to get certain files. If I cd to a particular directory and run ls -al files are displayed.

When I issue (for example)
Code:
get wget.zip
I get:-
Code:
bina
200 Type set to I
get wget.zip
local: wget.zip remote: wget.zip
229 Entering Extended Passive Mode (|||50246|)
550 wget.zip: No such file or directory
I've tried changing permissions and ownership but can't figure out what is wrong.

Any ideas?
 

ShelLuser

Son of Beastie

Thanks: 1,271
Messages: 2,695

#2
Most likely a firewall issue. Are you sure that all required ports have been added to the firewall?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,099
Messages: 26,992

#4
Can you show the whole output? Login, do an ls, then get the file. Post this whole, including the ls command. The error indicates the file doesn't exist. So you're either not in the correct directory or the file simply isn't there.
 

balanga

Daemon

Thanks: 68
Messages: 2,059

#5
Can you show the whole output? Login, do an ls, then get the file. Post this whole, including the ls command. The error indicates the file doesn't exist. So you're either not in the correct directory or the file simply isn't there.
I'm looking at my setup and can't find a configuration file anywhere... I guess I'll try reinstalling proftpd again....

There's a guide here which I'll follow... although I'm not sure if the proftp archive directory can be specified anywhere. I assume it should be /home/ftp.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,099
Messages: 26,992

#6
Never assume anything. Always check and double-check.

Code:
-c,--config config-file
		   Specifies an	alternate config-file to be parsed at startup,
		   rather than the default configuration  file.	  [b]The  default
		   configuration file is /usr/local/etc/proftpd.conf[/b]
From proftpd(8).

And
Code:
: ${proftpd_config:="/usr/local/etc/proftpd.conf"}
In /usr/local/etc/rc.d/proftpd.
 

balanga

Daemon

Thanks: 68
Messages: 2,059

#7
Can you show the whole output? Login, do an ls, then get the file. Post this whole, including the ls command. The error indicates the file doesn't exist. So you're either not in the correct directory or the file simply isn't there.
~/.netrc
Code:
machine 176.122.227.32 login ftp password ftp macdef init
ls -al
cd pub
cd usr
cd local
cd www
cd apache24
cd data
ls -al
bina
get info.php
get /pub/usr/local/www/apache24/data/info.php
bye
Log:-
Code:
ftp 176.122.227.32
Connected to 176.122.227.32.
220 ProFTPD 1.3.5b Server (ProFTPD Default Installation) [::ffff:176.122.227.32]
331 Anonymous login ok, send your complete email address as your password
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ls -al
229 Entering Extended Passive Mode (|||41852|)
150 Opening ASCII mode data connection for file list
drwxr-xr-x   3 root     wheel         512 Oct 18 22:38 .
drwxr-xr-x   3 root     wheel         512 Oct 18 22:38 ..
-rw-r--r--   1 ftp      ftp          2336 Jul 10 12:05 This server is not secure, please read me (Time to Read: 1 minute).txt
drwxr-xr-x   3 root     ftp           512 Oct 19 04:31 pub
226 Transfer complete
cd pub
250 CWD command successful
cd usr
250 CWD command successful
cd local
250 CWD command successful
cd www
250 CWD command successful
cd apache24
250 CWD command successful
cd data
250 CWD command successful
ls -al
229 Entering Extended Passive Mode (|||2022|)
150 Opening ASCII mode data connection for file list
drwxr-xr-x   2 root     ftp           512 Oct 19 05:00 .
drwxr-xr-x   3 root     ftp           512 Oct 19 04:32 ..
-rw-r--r--   1 www      80             21 Dec 10  2016 info.php
-rw-------   1 root     wheel         191 Oct 19 04:51 netrc
226 Transfer complete
bina
200 Type set to I
get info.php
local: info.php remote: info.php
229 Entering Extended Passive Mode (|||13774|)
150 Opening BINARY mode data connection for info.php (21 bytes)
100% |***********************************|    21      118.54 KiB/s    00:00 ETA
226 Transfer complete
21 bytes received in 00:00 (0.41 KiB/s)
get /pub/usr/local/www/apache24/data/info.php
local: /pub/usr/local/www/apache24/data/info.php remote: /pub/usr/local/www/apache24/data/info.php
ftp: Can't access `/pub/usr/local/www/apache24/data/info.php': No such file or directory
bye
I can't figure out why I can retrieve info.php after cding to the directory but can't when using a path....

I just noticed that wget will work using a path...
 
Top