creating an ftp server .. minor issue

Status
Not open for further replies.

iinfi

mekalodu
its been some time since i have done this and now i am facing some issues.

i need to create just an anonymous ftp server using vsftpd.

Code:
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
anon_root=/ftp/

when i leave the anon_root parameter to default i dont face any issue. when i change it to /ftp with file permissions as below

Code:
[root@localhost ~]# ll / | grep ftp
drwxrwxrwx   3 ftp  ftp   4096 Apr  4 16:04 ftp
[root@localhost ~]#

i get the following error

Code:
[root@client ~]# ftp 192.168.5.221
Connected to 192.168.5.221.
220 Welcome to blah FTP service.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.5.221:root): ftp
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/ftp
Login failed.
ftp>



when i dont change the anon_root parameter i dont face any issue and if i type ftp://192.168.5.221 the pub folder shows up.

but when i change the parameter i get a login box and whatever i do i cannot login to the ftp server.

plz help
 
OP
iinfi

iinfi

mekalodu
update:
the system which i m using is RHEL 5.3


and i just found out that if i keep SE Linux as permissive or disabled things work as they should. and i changed the owner and group of /ftp to root:root

ftp://192.168.5.221 takes me to the contents of the /ftp drive

does anyone know how to proceed with SE Linux kept on?

thanks
 

mediator

Technomancer
As root,
Code:
setsebool -P ftp_home_dir=1
setsebool -P allow_ftpd_anon_write=1

I guess you don't know much bt selinux. Keep it to permissive mode for it can lead to plenty of hassles and just observe the log if you want to learn it. Enforce it when u really r confident bt it.
 
Status
Not open for further replies.
Top Bottom