CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 6 - Software Support
  vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread Rated:  1 Votes
  •  numeratanero
      numeratanero
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#12
Newbie
Joined: 2011/10/2
From
Posts: 6
Now I still get the next error:
Antwoord:	220 (vsFTPd 2.2.2)
Commando:	USER wesley
Antwoord:	331 Please specify the password.
Commando:	PASS *********
Antwoord:	500 OOPS: cannot change directory:/home/ftp/wesley
Fout:	Fatale fout
Fout:	Kan niet verbinden met server


This will solve it

/usr/sbin/setsebool -P ftp_home_dir 1
Posted on: 2012/3/21 14:19
Create PDF from Post Print
Top
  •  miko
      miko
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#11
Regular Board Member
Joined: 2005/5/3
From BiH, Sarajevo
Posts: 53
Hi ,
try change some lines in file /etc/sysconfig/iptables-config

IPTABLES_MODULES="ip_conntrack_netbios_ns ip_conntrack_ftp ip_nat_ftp"

after restart iptables: service iptables restart
Posted on: 2012/3/12 14:18
Create PDF from Post Print
Top
  •  TrevorH
      TrevorH
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#10
Moderator
Joined: 2009/9/24
From Brighton, UK
Posts: 6372
Look harder or possibly try to find a way to increase the log level. Whatever is going wrong will be logging somewhere.
_________________
Linux/VoIP Systems Administrator
Posted on: 2012/3/4 17:05
Create PDF from Post Print
Top
  •  Mitchel
      Mitchel
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#9
Peeking in the Member Window
Joined: 2012/1/28
From
Posts: 11
Quote:

TrevorH wrote:
In my experience with ftp, yes, ip_conntrack_ftp is essential! That doesn't mean that you might not be able to make it work without but those are the two things that I've used to make it work and missing one of them breaks it - 1) open port 21 and 2) modprobe ip_conntrack_ftp.

However, I do not guarantee that this will fix your current problem as that looks more like a permissions problem. To fix that you'll need to find errors in your log files so I suggest that you go back to those now and see if there's anything logged.


Logs does not say anything helpfully :(
Posted on: 2012/3/4 14:38
Create PDF from Post Print
Top
  •  TrevorH
      TrevorH
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#8
Moderator
Joined: 2009/9/24
From Brighton, UK
Posts: 6372
In my experience with ftp, yes, ip_conntrack_ftp is essential! That doesn't mean that you might not be able to make it work without but those are the two things that I've used to make it work and missing one of them breaks it - 1) open port 21 and 2) modprobe ip_conntrack_ftp.

However, I do not guarantee that this will fix your current problem as that looks more like a permissions problem. To fix that you'll need to find errors in your log files so I suggest that you go back to those now and see if there's anything logged.
_________________
Linux/VoIP Systems Administrator
Posted on: 2012/3/4 13:51
Create PDF from Post Print
Top
  •  Mitchel
      Mitchel
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#7
Peeking in the Member Window
Joined: 2012/1/28
From
Posts: 11
Quote:

TrevorH wrote:
Great, so you now have port 21 open. Did you also load the ip_conntrack_ftp module with modprobe? Since you don't also have port 20 open (which is also needed for ftp) you will need to do this - especially if you need to use passive ftp.


No i diddn't load ip_conntrack_ftp with modle modprobe.
After i fixed the iptables the vsftpd works verry wel, so is it really necessary?

Now I still get the next error:
Antwoord:	220 (vsFTPd 2.2.2)
Commando:	USER wesley
Antwoord:	331 Please specify the password.
Commando:	PASS *********
Antwoord:	500 OOPS: cannot change directory:/home/ftp/wesley
Fout:	Fatale fout
Fout:	Kan niet verbinden met server
Posted on: 2012/3/4 13:34
Create PDF from Post Print
Top
  •  TrevorH
      TrevorH
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#6
Moderator
Joined: 2009/9/24
From Brighton, UK
Posts: 6372
Great, so you now have port 21 open. Did you also load the ip_conntrack_ftp module with modprobe? Since you don't also have port 20 open (which is also needed for ftp) you will need to do this - especially if you need to use passive ftp.
_________________
Linux/VoIP Systems Administrator
Posted on: 2012/3/4 13:25
Create PDF from Post Print
Top
  •  Mitchel
      Mitchel
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#5
Peeking in the Member Window
Joined: 2012/1/28
From
Posts: 11
Quote:

pschaff wrote:
Have you fixed the firewall rule set?



yes i did.

This is the result:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]

-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

COMMIT
Posted on: 2012/3/4 12:25
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#4
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Have you fixed the firewall rule set?
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/3/4 5:20
Create PDF from Post Print
Top
  •  Mitchel
      Mitchel
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#3
Peeking in the Member Window
Joined: 2012/1/28
From
Posts: 11
Quote:

TrevorH wrote:
You have removed the rule from your iptables that did "-j RH-Firewall-1-INPUT" which jumped to that chain of rules. This means that the rules in the RH-Firewall-1-INPUT chain are no longer being used so you either need to reinstate the default jump rule or insert your rules in the INPUT chain instead. The rules you have at present in the RH-Firewall-1-INPUT are now orphaned and you should either remove them or reinstate the jump from the INPUT chain.

For the vsftpd error, you need to look in the logs /var/log/vsftpd.log, /var/log/messages and/or /var/log/secure for clues.



/var/log/vsftpd.log
empty



/var/log/messages
nothing happens if I trying to login



/var/log/secure
no problems




What to do now? o.O
Posted on: 2012/3/3 23:24
Create PDF from Post Print
Top
  •  TrevorH
      TrevorH
Re: vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#2
Moderator
Joined: 2009/9/24
From Brighton, UK
Posts: 6372
You have removed the rule from your iptables that did "-j RH-Firewall-1-INPUT" which jumped to that chain of rules. This means that the rules in the RH-Firewall-1-INPUT chain are no longer being used so you either need to reinstate the default jump rule or insert your rules in the INPUT chain instead. The rules you have at present in the RH-Firewall-1-INPUT are now orphaned and you should either remove them or reinstate the jump from the INPUT chain.

For the vsftpd error, you need to look in the logs /var/log/vsftpd.log, /var/log/messages and/or /var/log/secure for clues.
_________________
Linux/VoIP Systems Administrator
Posted on: 2012/3/1 18:13
Create PDF from Post Print
Top
  •  Mitchel
      Mitchel
vsftpd 500 OOPS: cannot change directory:/home/ftp/%user%
#1
Peeking in the Member Window
Joined: 2012/1/28
From
Posts: 11
Hello Centos peoples! =)

I got 2 problems.

If i trying to connect to my ftp server, he can't find the vsftpd server.
If i turn the iptables off he can connect.

This is on my conf:

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]

-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

#ssh
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
#vsftpd
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT


COMMIT

What is wrong with it? (ssh does work)

Now, my second problem:
Antwoord:	220 (vsFTPd 2.2.2)
Commando:	USER wesley
Antwoord:	331 Please specify the password.
Commando:	PASS *********
Antwoord:	500 OOPS: cannot change directory:/home/ftp/wesley
Fout:	Fatale fout
Fout:	Kan niet verbinden met server


Just to try the rights:
drwxrwxrwx. 2 wesley ftp-users 4096 Mar 1 15:25 wesley

I dont know what the rights should be??

[root@centos ~]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> on
ftpd_connect_db --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off


If you need more info, plz ask it =)
I hope you can help me.


Regards Mitchel
Posted on: 2012/3/1 17:07
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com