LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-10-2007, 01:44 PM   #16
dhishoom
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
Tried everything but still not working !


Hi Guys,

I have setup vsftpd on my redhat rel 5 server and I can logon with a regular userid that I created, but when I create a user using the following script, it gives me "ftp 500 OOPS: cannot change directory" when I try to logon.

if [ -z $1 ]
then
echo Usage: $0 user_name passwd
exit 1
fi

if [ -e /home/ftp/jail/$1 ]
then
echo User already exists, delete user first
exit 1
fi

/usr/sbin/useradd -d /home/ftp/jail/$1 -s /dev/null -g ftp-users -m -k /home/ftp/skel $1

#mkdir /home/ftp/jail/$1
mkdir /home/ftp/jail/$1/in
mkdir /home/ftp/jail/$1/out
chown -R $1:ftp-users /home/ftp/jail/$1
echo $1 >> /etc/vsftpd.chroot_list
expect /home/ftp/scripts/changepass $1 $2


When I ftp -->

[root@wueild01 scripts]# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhostcsoper): testuser
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/ftp/jail/testuser
Login failed.
ftp>


I have chmod 777 all the dir and subdirs for these users, but still cant get in.

When I create a user without any options it can access ftp (log below), the aforesaid users still fail with that error.

-------
[root@wueild01 scripts]# /usr/sbin/useradd test
[root@wueild01 scripts]# passwd test
Changing password for user test.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@wueild01 scripts]# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhostcsoper): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,200,141)
150 Here comes the directory listing.
226 Directory send OK.
ftp> pwd
257 "/"
ftp> cd ..
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (127,0,0,1,230,198)
150 Here comes the directory listing.
226 Directory send OK.
ftp>

-------



Can somebody help!!!!
 
Old 12-11-2007, 12:21 PM   #17
dhishoom
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
Silly mistake (Here's the solution)

Guys, it was a security issue.

I had to chown and chgrp the /home/jail directory for ftp-users (recursive).

Here's the command -

chgrp ftp-users /home/jail

Lesson Learnt - > Check your security of the directory Tree for your ftp Jail.
 
Old 02-27-2008, 05:19 AM   #18
rushadrenaline
Member
 
Registered: Nov 2006
Location: Bangalore,New delhi
Distribution: RHEL5, Kubuntu, Mandriva 2008
Posts: 69

Rep: Reputation: 15
I chkd my selinux, but i had already disabled it. So it was something else in my case.
Well i fixed the problem ,while trying to work with vsftpd.
Actually the directory for the user i created (adduser ftpsharuser) had no directory inside it. i.e. /home/ftpsharuser had no directory in it.
Later i created a directory named shared ,,so it became /home/ftpsharuser/shared .
Then i chowned it to ftpsharuser (chown ftpsharuser:ftpsharuser /home/ftpsharuser/shared )
Then i commented user_config_dir=/home/blah , in /etc/vsftpd/vsftpd.conf,, and also changed "xferlog_std_format=YES" to NO
Restarted vsftpd
Thereafter when i logged in via ftp,,,there was no error (like there was one previously,,,,500 error changing directory).
So its like permission problem
 
Old 01-25-2010, 01:30 AM   #19
mahdit
LQ Newbie
 
Registered: Jan 2010
Posts: 7

Rep: Reputation: 0
Red face Real Solution is...

first you must know any user(except anonymous) is denied to login!! because :
1-root user is in ftpuser file list and denied to login
2-until you dont use guest_enable=YES your downlevel users cant login

the error that you see is 500 OOPS .
I think it is useful to solve your problem my dear friends
 
Old 03-10-2010, 05:07 PM   #20
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
Thanks!!!
I can use all with fireFTP but is there any to browse directly from the browser to upload and download
 
Old 03-11-2010, 02:40 AM   #21
rushadrenaline
Member
 
Registered: Nov 2006
Location: Bangalore,New delhi
Distribution: RHEL5, Kubuntu, Mandriva 2008
Posts: 69

Rep: Reputation: 15
Hey linux guy i didnt get your question ??? If you are asking for a browser from where you can browse (upload/download) ftp file, then just try konqueror (default in most of distros).
 
Old 05-24-2011, 06:15 AM   #22
dc6268
LQ Newbie
 
Registered: May 2011
Posts: 1

Rep: Reputation: Disabled
Thumbs up Solution

No need to to disable SELinux.

Try this:

setsebool -P ftp_disable_trans=1

iptables -A INPUT -s ! 192.168.254.0/16 -p tcp --dport 21 -j REJECT

service iptables save
 
Old 11-07-2011, 02:42 PM   #23
Jeezus
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Wink Permission

Hi

I'll start with telling you I'm not a Linux expert.

Changing the root folder (and all underlying folders) permissions worked for me.
The permissions on root ftp folder were:
drw-rw-r-- 6 jeezus jeezus 4096 Oct 30 22:14 jeezus

and I've changed them to:
drwxrwxr-- 6 jeezus jeezus 4096 Oct 30 22:15 jeezus

so... chmod -R 774 <ftp_root_folder>

That did the trick for me...
Cheers
 
Old 09-18-2012, 05:41 AM   #24
dodo_ur
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
try this

disable selinux
vi /etc/selinux/config

SELINUX=disable
 
Old 03-24-2013, 09:41 PM   #25
Bird2010
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Rep: Reputation: Disabled
Latest Version direct from the author

Everyone,

Get the latest version of vsftpd direct from the author: https://security.appspot.com/vsftpd.html

I had lots of problems because the latest version of Linux Mint 14 was using an old version of vsftpd. I read the Software Manager page carefully for vsftpd and I noticed the author's website link. I downloaded it and I am happy now!
 
  


Reply



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
500 OOPS: vsftpd: must be started as root userbr Linux - Networking 3 06-27-2011 12:44 AM
500 OOPS: unrecognised variable in config file c0c0deuz Linux - Networking 10 04-05-2007 05:09 PM
500 OOpS error w/ vsftpd 5amYan *BSD 5 11-08-2006 05:59 PM
VSFTP: 500 OOPS: unrecognised variable in config file snapper64 Linux - Software 4 07-01-2005 04:16 PM
500 OOPS: child died pandora Linux - Networking 1 02-10-2003 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration