Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed CentOS 5.4 on a rackspace cloud server and installed virtualmin which all seemed to go fine. The only problem I have is that I can not access the virtual servers directories via FTP.

I get the following from filezilla:

Status: Connecting to 1.1.1.1:21...
Status: Connection established, waiting for welcome message...
Response: 220 FTP Server ready.
Command: USER username
Response: 331 Password required for username.
Command: PASS ***************
Response: 230 User username logged in.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (1,1,1,1,216,214)
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing

and I get this from my /var/secure/log file

Sep 22 19:40:42 stickeeserver proftpd: pam_unix(proftpd:session): session opened for user username by (uid=0)
Sep 22 19:40:42 server proftpd[14051]: 94.136.40.82 (::ffff:217.207.31.60[::ffff:217.207.31.60]) - USER nastypasty: Login successful.

Sep 22 19:40:42 server proftpd[14051]: 94.136.40.82 (::ffff:217.207.31.60[::ffff:217.207.31.60]) - Preparing to chroot to directory '/home/username'

Sep 22 19:40:42 server proftpd[14051]: 94.136.40.82 (::ffff:217.207.31.60[::ffff:217.207.31.60]) - mod_delay/0.5: delaying for 728 usecs

Sep 22 19:40:42 server proftpd[14051]: 94.136.40.82 
(::ffff:217.207.31.60[::ffff:217.207.31.60]) - error setting IPV6_V6ONLY: Protocol not available

Any help would be greatly appreciated, I'm not totally new to Linux but it's not my strongest subject. I do like to know exactly why problems occur though and how exactly to fix them so the more detail the better!

cheers

share|improve this question

3 Answers 3

First up, what about this error makes you think your problem is PAM related? I don't see any problem with the PAM interaction in those messages...it says "Login successful." so the PAM portion of the story seems to be working fine. I have frequently seen PAM problems with ProFTPd (particularly with the ProFTPd package from RPMForge), but this isn't the behavior I've seen (for starters, there was an error about PAM rather than a "Login successful" message!). ;-)

Try switching to active mode rather than passive in your FTP client and see if the behavior changes. This can indicate you're using NAT but don't have ftp connection tracking enabled, or that there is a firewall somewhere along the way that is interfering (some consumer routers have odd problems with FTP in either active or passive mode).

Also, make sure you have our ProFTPd package rather than one from some other repository (CentOS does not provide a ProFTPd package, so we include on in our repositories for CentOS).

rpm -q proftpd

If it's ours it'll have "vm" in the version somewhere.

share|improve this answer

I would advise you configure it not to try and use ipv6 and then check if the problem is gone.

share|improve this answer
    
RANT mode: hate it how current distributions enable ipv6 stuff by default given it is realistically still experimental academic w*nk for most applications, and causes problems all over the place. –  rackandboneman Jun 13 '12 at 23:54

PAM is not a problem here since logs show the user was authenticated. The real problem comes from hosting FTP server on a cloud. The most common caveat:

FTP Passive mode requires additional ports to be open on a server.

Your logs above show that port 55254 was not open to connect from outside.

To fix this,

Also, this might not be your issue since your server replies with the same IP address you mentioned, but the same setup for Amazon won't work: you need to specify your external IP in proftpd.conf using MasqueradeAddress 1.1.1.1 option to be able to connect from outside of the cloud.

Granted, if this is the real issue, you could still work with FTP in active mode by setting up this option in your FTP client but this won't work for everyone.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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