LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-20-2006, 01:54 PM   #1
ironmike
LQ Newbie
 
Registered: Feb 2004
Location: Virginia, USA
Distribution: RedHat 4.5
Posts: 6

Rep: Reputation: 0
Question Anyone actually have anonymous vsftpd working while protected with selinux?


I am using Fedora Core 4, vsftpd, anonymous ftp. All works well except I can't upload files anonymously, I get '553 Could not create file'. I have selinux protection enabled for the vsftpd server.

I've checked many, many threads and found users with the same error, and the solution was usually to disable selinux protection for the vsftpd daemon.

Does ANYONE out there have selinux protection enabled on a Fedore Core 4 system, AND have anonymous FTP working with vsftpd?

My /etc/vsftpd/vsftpd.conf:

Code:
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=qrdbupdt
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
nopriv_user=ftpsecure
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
dirlist_enable=NO
hide_ids=YES
download_enable=YES
 
Old 08-20-2006, 07:30 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
found users with the same error
Could you post some related (avc) error lines from your syslog?
 
Old 08-21-2006, 12:55 PM   #3
ironmike
LQ Newbie
 
Registered: Feb 2004
Location: Virginia, USA
Distribution: RedHat 4.5
Posts: 6

Original Poster
Rep: Reputation: 0
I don't see any messages at all that are related to selinux, or any other security messages for that matter. I'm looking in /var/log/messages

A brief anonymous FTP session, sanitized for your protection:
Code:
ftp ftp.xxxxxxx.com
Connected to updates.xxxxxxx.com.
220 Welcome to .........
Name (ftp.xxxxxxx.com): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put sorts.rexx
local: sorts.rexx remote: sorts.rexx
200 PORT command successful. Consider using PASV.
553 Could not create file.
ftp>
directory permissions are 777 on the directory that FTP users are thrown into first. Security context for that directory is system_u: object_r: public_content_t. chown information is 'ftpsecure' as owner and group both. 'ftpsecure' is the ftp daemon insecure userid.
 
Old 08-21-2006, 06:53 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
chown_username=qrdbupdt
Does this user exist of have you filled this in with garbage?


xferlog_file=/var/log/vsftpd.log
Any clues from here?


nopriv_user=ftpsecure
Does this user exist?
Has user ftpsecure got write access to the dir your user is dumped in?


local: sorts.rexx remote: sorts.rexx
Does the file exist?
Are you trying to overwrite the file with itself (local $PWD == remote $PWD)?


I have selinux protection enabled for the vsftpd server.
Do you run strict or targetted policy?
Do you have any ftpd related booleans?
 
Old 08-23-2006, 09:06 AM   #5
ironmike
LQ Newbie
 
Registered: Feb 2004
Location: Virginia, USA
Distribution: RedHat 4.5
Posts: 6

Original Poster
Rep: Reputation: 0
Pressures at work have made me abandon anonymous FTP for now. I kept selinux enabled in target policy mode, but I turned off anonymous FTP and instead now force entry of a userid/password for FTP, but I then keep each such user in a chroot sandbox. Vsfptd seems to be very good @ this.

Many thanks to unSpawn for caring enough to reply and help me. I may revisit anonymous FTP later.

To answer your questions, file sorts.rexx did exist, ftpsecure did have write access to the directories question (at the user, not group level),and userid qrdbupdt does exist. I saw nothing in the vsftpd log to indicate what the failure reason was.
 
Old 08-23-2006, 09:20 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Pressures at work have made me abandon anonymous FTP for now.
OK. So be it. If you want to tackle the problem again just add to this thread or reference it (efficiency).


Many thanks
You're welcome. It's what we're here for.
 
  


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
vsftpd and SELinux HelplessNewbie Linux - Software 6 08-28-2007 10:54 AM
vsftpd anonymous overwrite lapthorn Linux - Security 3 10-11-2006 11:20 AM
vsftpd fc3 anonymous rights not working shorun Linux - Networking 2 04-14-2006 03:42 AM
SUS9.3: Anonymous vsftpd not working fisayo SUSE / openSUSE 4 12-01-2005 04:54 PM
VSFTPD Does not Allow Anonymous Downloads Nervo Linux - Networking 1 08-03-2003 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:12 PM.

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