LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   vsftpd: FTP clients work, ftp://xxxx in mozilla does not. Anonymous user prob? (https://www.linuxquestions.org/questions/linux-server-73/vsftpd-ftp-clients-work-ftp-xxxx-in-mozilla-does-not-anonymous-user-prob-781916/)

arashi256 01-13-2010 05:35 AM

vsftpd: FTP clients work, ftp://xxxx in mozilla does not. Anonymous user prob?
 
I have an FTP server which is linked to a user account in a chroot jail and I have disabled anonymous access (anonymous_enable=NO). I can FTP into this server from Windows command line FTP client and every other FTP client I have used with no problems.

However, I have been trying to access it via a web browser (firefox) using ftp://<server name>. This connects and prompts me for my login details, which I enter as I should. But then I get a 425 connection error.

In my /var/log/secure log, I see the entry: -

Jan 13 10:12:20 joshua11 vsftpd[13952]: pam_unix(vsftpd:auth): check pass; user unknown
Jan 13 10:12:20 joshua11 vsftpd[13952]: pam_unix(vsftpd:auth): authentication failure; logname= uid=0 euid=0 tty=ftp ruser=anonymous rhost=<MY IP ADDRESS>
Jan 13 10:12:20 joshua11 vsftpd[13952]: pam_succeed_if(vsftpd:auth): error retrieving information about user anonymous

Why is Mozilla Firefox trying to connect as an anonymous user when it has already prompted me for my login details?


Any ideas? Thanks.

w3bd3vil 01-13-2010 06:02 AM

That's a bit odd.
How about trying ftp://user:pass@IP

arashi256 01-13-2010 06:28 AM

Quote:

Originally Posted by w3bd3vil (Post 3824951)
That's a bit odd.
How about trying ftp://user:pass@IP

Using:-

ftp://<username>:<password>@<IP address>

..I get nothing, just a 425 connection error. I don't know if this is something to do with the FTP server setup (unlikely, since it works with "proper" FTP clients) or something to do with the browser. I suppose it's unlikely to be trying to do anything over port 80, right? That port is closed anyway.

bathory 01-13-2010 07:12 AM

I guess it's a passive mode problem. Add
Code:

pasv_promiscuous=YES
in vsftpd.conf and see if it helps

Regards

arashi256 01-13-2010 07:47 AM

Nope, no joy there. Thanks though. Could it be a passive mode problem? How does the ftp engine of Firefox work? I guess it's pretty basic, though...

bathory 01-13-2010 08:21 AM

I guess it's passive mode because firefox does not support active mode (see here). Besides 425 is a connection error, not an authentication error.
The anonymous user that is logged, is because if you don't supply a username and/or password in address bar, firefox tries first anonymous user and then prompts for real user credentials.
If your server is behind a firewall, disable it, or open some ports for passive mode and configure vsftpd to use the same ports

arashi256 01-13-2010 08:36 AM

Quote:

Originally Posted by bathory (Post 3825100)
I guess it's passive mode because firefox does not support active mode (see here). Besides 425 is a connection error, not an authentication error.
The anonymous user that is logged, is because if you don't supply a username and/or password in address bar, firefox tries first anonymous user and then prompts for real user credentials.
If your server is behind a firewall, disable it, or open some ports for passive mode and configure vsftpd to use the same ports

Okay, this works with the ftp://<user>:<pass>@<ip address> directive, but not indirectly via a dialog box. Probably the best I can hope for :)

Thank you.

bathory 01-13-2010 08:50 AM

It should work in both ways.
If you supply a URL like ftp://ftp.domain.com, firefox first tries anonymous ftp and if it fails it should present the dialog box to enter credentials. Are you sure it's not a firefox cache problem?

arashi256 01-13-2010 09:31 AM

Quote:

Originally Posted by bathory (Post 3825133)
It should work in both ways.
If you supply a URL like ftp://ftp.domain.com, firefox first tries anonymous ftp and if it fails it should present the dialog box to enter credentials. Are you sure it's not a firefox cache problem?

Ooops....sorry, yes it works both ways. Cache problem as you said. Double-thanks :)


All times are GMT -5. The time now is 01:16 AM.