DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st June 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Default [VSFTPD] Can't write in directory

Hi,

I am trying to set a ftp server with VSFTPD. I built a vsftpd.conf file by using the man pages and i can connect a local user to the server. The problem is that i can't write in the directory of that user (no create file or directory, rename file and so on).

This is the vsftpd.conf:

Code:
 
anonymous_enable=NO
local_enable=YES
chroot_local_user=YES
local_umask=022

dirmessage_enable=YES

listen=YES
write_enable=YES
background=YES

max_clients=5
max_per_ip=2

guest_enable=YES
guest_username=vsftpd
what's wrong with it?

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 1st June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

Everything looks fine from that. What kind of error messages are you getting (if any)? What are the perms on the directory you are trying to write to? That and other information that may be helpful would be much appreciated

EDIT: Also, do you have vsftpd_enable="YES" in /etc/rc.conf, and have you restarted the daemon after making the above changes to the .conf file?
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
  #3   (View Single Post)  
Old 1st June 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Default

Quote:
Originally Posted by cajunman4life View Post
Everything looks fine from that. What kind of error messages are you getting (if any)? What are the perms on the directory you are trying to write to? That and other information that may be helpful would be much appreciated

EDIT: Also, do you have vsftpd_enable="YES" in /etc/rc.conf, and have you restarted the daemon after making the above changes to the .conf file?
Yes I did all of that.

I made another test and it seems that the user is chrooted to the guest_username home and not to its home. That explains why he can't create directories.

Now the question is, why is he redirected to that directory?
Reply With Quote
  #4   (View Single Post)  
Old 1st June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

Try getting rid of guest_enable and guest_username and see if that has an effect. My guess is somehow you're logging in as foo, getting chrooted in /home/foo, but as user vsftpd.

Do you really need "guest" logins on your FTP server?
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
  #5   (View Single Post)  
Old 1st June 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Default

actually, it is the opposite.

I am logged in as foo but chrooted to /home/vsftpd.

I really need the guest as, if i well understood, it provides access for virtual users.
Reply With Quote
  #6   (View Single Post)  
Old 1st June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

Well, looking at the man page at http://vsftpd.beasts.org/vsftpd_conf.html, I read the following:

guest_enable
If enabled, all non-anonymous logins are classed as "guest" logins. A guest login is remapped to the user specified in the guest_username setting.

Default: NO

So it appears that is what is happening. All regular (read: non-anonymous) logins are being re-mapped to guest_username. So it appears you'll need to disable guest_enable and find an alternative method to allow "virtual" users.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
  #7   (View Single Post)  
Old 1st June 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Default

you are right.

So now, i have to find another way to enable virtual users.

thanks!
Reply With Quote
  #8   (View Single Post)  
Old 1st June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

Please be sure to post your findings in terms of allowing virtual users. I for one will be setting up something similar soon, and perhaps others could benefit from your findings as well.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
/tmp on ram write denied gosha OpenBSD General 8 29th March 2009 04:46 PM
strange "~" directory in home directory gosha OpenBSD General 5 23rd February 2009 06:12 PM
Why you should write a guide/howto in XML J65nko Guides 4 19th October 2008 07:46 PM
[F1] write usb modem driver raixun Programming 7 17th July 2008 11:06 AM
VSFTPd: pid file kostromin FreeBSD Ports and Packages 0 4th July 2008 08:35 AM


All times are GMT. The time now is 03:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick