LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-17-2012, 03:48 PM   #1
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Rep: Reputation: 0
vsftpd cannot access NFS-mounted directories


I'm trying to set up an FTP server running vsftpd. (Normally we used SFTP, but in this instance we need to use regular FTP.) I have local_enable=YES set in vsftpd.conf so that users can access their own home directories. The problem is that /home is mounted from an NFS server, and vsftpd isn't playing well with NFS. The FTP login proceeds, and the user is authenticated, but the ftp session ends with:

500 OOPS: cannot change directory:/home/<username>
Login failed.

If I change the user's home directory to a local directory, it works fine, but that's not something I can really do long-term.

I have read that SELinux interferes with NFS-mounted directories in vsftpd, but I have SELinux completely disabled, and I'm still getting the "500 OOPS error".

I've been playing around with NFS settings and vsftpd settings, and I haven't been able to get around this. What am I missing?

We're running RHEL 5 on the NFS server, and RHEL 6 on the FTP server, with vsftpd 2.2.2-6.
 
Old 05-17-2012, 08:20 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Are you using automount for the home dirs or is it permanently mounted via /etc/fstab ?
 
Old 05-17-2012, 09:07 PM   #3
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Are you using automount for the home dirs or is it permanently mounted via /etc/fstab ?
It's mounted with /etc/fstab -- no automount. I've tried using different mount options in the fstab file, but none of the options have had any effect on this.
 
Old 05-17-2012, 09:46 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I've got a test vm with auto-mounted home dirs, I'll install vsftpd and see if local accounts will work - get back to you soon.
 
Old 05-17-2012, 10:05 PM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
It seems to be working for me with automounted homedirs but the nfs server is v6 as opposed to your v5. Did you enable chroot_local_user and/or have any accounts in /etc/vsftpd/chroot_list ?
 
Old 05-18-2012, 07:38 AM   #6
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Original Poster
Rep: Reputation: 0
I've done it with chroot_local_user enabled and disabled, and the same error occurs either way.

Just to see what would happen, I tried automounting /home instead of mounting it in /etc/fstab. In that case, the user is authenticated correctly as usual, /home/<username> is automounted, but the user still gets:

500 OOPS: cannot change directory:/home/<username>
Login failed.

at the ftp prompt.

Maybe I'll try setting up a fresh RHEL 6 NFS server to see if that behaves any differently.
 
Old 05-18-2012, 09:45 AM   #7
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 275

Rep: Reputation: 46
Are you setting up local users, or are you setting up virtual users?
 
Old 05-18-2012, 01:21 PM   #8
guertin
LQ Newbie
 
Registered: Apr 2010
Distribution: Red Hat, Fedora, CentOS
Posts: 10

Original Poster
Rep: Reputation: 0
Got it! I set up a test RHEL 6 NFS server, and I could connect to that right out of the box. So then it became an exercise to see what was different between that and my existing RHEL 5 NFS server. To be honest, I'll admit I kind of lost track about which changes got it to work, so I'm still not sure what I did to get it working. But I suspect it one of the iptables settings in /etc/sysconfig/iptables. At any rate, it's working now. Thanks for all the help.
 
  


Reply

Tags
ftp, nfs, vsftpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access mounted sd card through nfs xhpohanka Linux - General 1 12-08-2011 09:25 AM
I can't access my mounted NFS share xri Slackware 1 08-24-2009 08:32 AM
VSFTPD mounted directories problem plaguekriz Linux - Newbie 3 08-17-2009 03:08 AM
Vsftpd access to mounted external drive HDWorx Linux - Software 5 02-28-2008 05:16 AM
FC6 broken with NFS-mounted /home directories? skellert Fedora 2 11-02-2006 10:37 PM


All times are GMT -5. The time now is 03:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration