Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Access vsftpd via webbrower

Status
Not open for further replies.

Live2Die

Technical User
May 5, 2004
104
CA
Hello

I have a redhat 9.0 linux box running vsftpd and am having troubles reaching the ftp portion when ever i connect through a web browser. I can access the ftp server fine from an ftp client but get a gateway error when i try to reach it via a web browser.

Any Ideas?

--------------------
Life is a mind game
Wanna Play?
 
I have the same problem because my current config will not allow Pasiv mode connections.
Hopefully one of the Linux Gurus here can confirm what needs to be changed
 
check your Tools\internet options\advanced
check the box that says "use passive ftp
 
i don't have access to the GUI side of things.

Can someone tell me how to do this via command line

--------------------
Life is a mind game
Wanna Play?
 
oops read the reply wrong

--------------------
Life is a mind game
Wanna Play?
 
OK did that. still getting an error

Here it is:

An error occurred opening that folder on the FTP site. Make sure you have permissions to access that folder

Details:
Operation Timed Out

Has anyone seen this before?

--------------------
Life is a mind game
Wanna Play?
 
M$ IE browser usally want the Read-eXecute bits set while real FTP clients can usually handle Read.

Hope it helps.



## Just because you can do something doesn't mean you should.

Lorenzo Wacondo (System Administrator)
 
What do i set the R-E bits on? The root dir?

--------------------
Life is a mind game
Wanna Play?
 
Set them on the files within the root of the ftp service, not / (root), possibly /var/ftp/ or wherever your FTP service points to.

If you are using anonymous log-ins something like 775 (RWXRWXR-X) or 770 (RWXRWX---) if you don't. This is overly permissive maybe 660 (RW-RW----).



## Just because you can do something doesn't mean you should.

Lorenzo Wacondo (System Administrator)
 
on my system the /var/ftp folder is rwxr-xr-x

the folders within /var/ftp which can be written to are rwxrwxrwx

the folders within /var/ftp from which data can be read are rwxr-xr-x
 
None of those worked...Im still getting a time out error

--------------------
Life is a mind game
Wanna Play?
 
It maybe a firewall issue. Verify your firewall is allowing the PASV FTP ports.

You can specify the port range by pasv_max_port and pasv_min_port statement in the config.



## Just because you can do something doesn't mean you should.

Lorenzo Wacondo (System Administrator)
 
But what values would i give:

pasv_max_port
pasv_min_port



--------------------
Life is a mind game
Wanna Play?
 
Whatever port range works for your site.

For example,

pasv_max_port 20480
pasv_min_port 10240

would allow vsftpd to use the port range 10240 to 20480 for the command channel instead of the traditional port 20. The data will be sent over 21 but the commands issued from the client will be sent over any port in the range specified. You will need to have the port range open on the firewall so your client commands can be seen and processed by the server.



## Just because you can do something doesn't mean you should.

Lorenzo Wacondo (System Administrator)
 
Oops I got the ports 20 and 21 usage reversed.

ftp-data 20/tcp File Transfer [Default Data]
ftp-data 20/udp File Transfer [Default Data]
ftp 21/tcp File Transfer [Control]
ftp 21/udp File Transfer [Control]

Sorry about that.



## Just because you can do something doesn't mean you should.

Lorenzo Wacondo (System Administrator)
 
What address do you use when trying to access the ftp server? Tell you browser to use ftp protocol rather than http. Try this: ftp://mydomain.com You will also need to have anonymous ftp available because your browser is not setup for the secret ftp handshake. ;-)

 
That is how i try to connect to it.

--------------------
Life is a mind game
Wanna Play?
 
Here is my vsftpd.conf file

anonymous_enable=NO
local_enable=YES
pasv_enable=YES
chroot_local_user=YES
write_enable=YES
local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
#nopriv_user=ftpsecure
#sync_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
ftpd_banner=Welcome to the St Lawrence Parks Commissions FTP service.
#deny_email_enable=YES
#banned_email_file=/etc/vsftpd.banned_emails
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd.chroot_list
#ls_recurse_enable=YES
pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES

Take a look

--------------------
Life is a mind game
Wanna Play?
 
for starters, change anonymous_enable to YES

restart the service

/etc/rc.d/init.d/vsftpd restart

try again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top