LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-06-2005, 07:13 PM   #16
emperorluciferion
LQ Newbie
 
Registered: Oct 2005
Posts: 1

Rep: Reputation: 0

'Disable SELinux protection for ftpd daemon' is sufficient for me. O_O

Also, I realized that you can actually write any files into any folders except the home directory, e.g. foo has his homedir at /home/foo. Using flashfxp to connect to the vsftpd will not allow me to write any shit in /home/foo but writing in /home/foo/blahblah etc are all ok. I guess this is a protection against replacing .bashrc scripts and stuff like that.
 
Old 10-24-2005, 04:49 AM   #17
graywiz
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
Quickie Solution to VSftpd problems in FC 4

Basically, Fedora works with SELinux(Security-Enhanced Linux).

This is the quick fix for the problem... Best solution would be to configure SElinux more directly for your particular use... I'm no expert in that part, hence the short quick solution here...

SELinux governss all daemon services...

You can disable SELinux protection for the ftpd daemon by executing:

% setsebool -P ftpd_disable_trans 1
% /etc/rc.d/init.d/vsftpd restart
 
Old 11-25-2006, 02:24 PM   #18
echat
Member
 
Registered: Nov 2006
Distribution: Kubuntu 9
Posts: 34

Rep: Reputation: 16
Question Can't figure out whats wrong with vsftp

Im having problems with my ftp. I can not login through browser and can't create folder or upload to pub/*. Anyone got any ideas? Below I posted both my error and my vsftpd.conf.

Also I am running FC6
----------------------------------------------------------
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
Desktop
InstallShield
Picture
themes
vmware
226 Directory send OK.
ftp: 49 bytes received in 0.05Seconds 1.04Kbytes/sec.
ftp> mkdir test
257 "/home/echat/test" created
ftp> rmdir test
250 Remove directory operation successful.
ftp> cd /var/ftp/pub
250 Directory successfully changed.
ftp> mkdir test
550 Create directory operation failed.
ftp>

----------------------------------------------------------

anonymous_enable=YES

local_enable=YES

write_enable=YES

local_umask=022

anon_upload_enable=YES

anon_mkdir_write_enable=YES

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

#chown_uploads=YES
#chown_username=whoever

xferlog_file=/var/log/vsftpd.log

xferlog_std_format=YES

#idle_session_timeout=600

#data_connection_timeout=120

#nopriv_user=ftpsecure

#async_abor_enable=YES

#ascii_upload_enable=YES
#ascii_download_enable=YES

ftpd_banner=Ec0mp

#deny_email_enable=YES

#banned_email_file=/etc/vsftpd/banned_emails

#chroot_list_enable=YES

#chroot_list_file=/etc/vsftpd/chroot_list

#ls_recurse_enable=YES

listen=YES

#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

---------------------------------------------
NOTE: I removed all comments from the conf file to save space

Last edited by echat; 11-25-2006 at 02:25 PM.
 
Old 11-26-2006, 09:53 AM   #19
uhuu
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
By default uploading/creating directories is disabled for /var/ftp/pub.
You have to give ordinary users the rights to do that.

Open terminal as root and give everyone the right to modify the directory with the following command:
Code:
chmod 777 /var/ftp/pub
 
Old 11-26-2006, 09:37 PM   #20
echat
Member
 
Registered: Nov 2006
Distribution: Kubuntu 9
Posts: 34

Rep: Reputation: 16
Re:

I have done that and still no luck, I even tried to
Code:
chown ftp /var/ftp/pub
and about all my possible users.

I believe it has something to do with the fact that /var is a mounted partition.
I can't even login as a user and get access to /var.
Thats only through ftp by the way. I have access to /var as a user locally.
Any more ideas?

here is my permissions on ftp and such:
drwxr-xr-x 3 root root 4096 Nov 18 20:27 ftp
drwxrwxrwx 5 root root 4096 Nov 26 22:25 pub

also tried:
drwxrwxrwx 3 root root 4096 Nov 18 20:27 ftp
 
Old 11-27-2006, 12:46 AM   #21
uhuu
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
Do you have selinux enabled?
Selinux might be blocking the write access to /var/ftp/pub. To find out try to create a dir with a user and after failure look at the system logs for selinux denials:
Code:
tail /var/log/messages
If selinux is the problem maker you can either disable it all together (bad if you want tougher security) or just allow the ftp part. There is a simple manual that covers how to allow ftp stuff with selinux:
http://www.die.net/doc/linux/man/man...selinux.8.html
I think you just need to give the directory correct selinux context to have it writable in ftp:
Code:
chcon -t public_content_rw_t /var/ftp/pub
 
Old 11-27-2006, 08:04 PM   #22
echat
Member
 
Registered: Nov 2006
Distribution: Kubuntu 9
Posts: 34

Rep: Reputation: 16
OK I got it to work. don't know if it was the line above or
Code:
setsebool -P allow_ftpd_anon_write=1
but none the less it worked

Got a list of the sebooleans:

Code:
ls -al /selinux/bool* | grep ftp

Last edited by echat; 11-28-2006 at 08:10 PM.
 
Old 04-21-2007, 01:46 PM   #23
echat
Member
 
Registered: Nov 2006
Distribution: Kubuntu 9
Posts: 34

Rep: Reputation: 16
Re::

Just going through my replies

Last edited by echat; 04-21-2007 at 01:51 PM.
 
  


Reply


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
problems reading iso fedora core 4 file from cd/hard drive tencan Fedora - Installation 6 10-31-2005 02:50 PM
[Fedora Core 3]Poor write performance with raid controller TomG22 Linux - Hardware 1 09-22-2005 09:25 AM
VSFTPD - Seting up virtual folder and users on Fedora Core 2 tosheeba Linux - Networking 2 10-18-2004 04:04 PM
Cannot write to fat32 partitions on Fedora Core 1 Salad Shooter Linux - Hardware 3 08-31-2004 01:34 PM
Problems with a .bin file, trying to install starOffice, Fedora Core 1 velibos Linux - Newbie 3 03-16-2004 12:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:45 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