LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-13-2003, 09:07 AM   #1
remi
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat Linux 9.0
Posts: 16

Rep: Reputation: 0
Unhappy FTP virtual users with different home directories


Hello all,

I'm a newbie. I had Red Hat Linux 8 before, now I have 9.

What's driving me nuts is I would just like to set up virtual users on a FTP server on my computer. Also, I would like those virtual users to have different home directories, and I don't want to have to create system accounts to do that.

I read that vsftpd and ProFTPd supports virtual users, but you can't specify different settings for each of them.

Pure-FTPd can, but I was never, never able to enable its virtual users feature, and that server is driving me nuts. I followed all the steps written in their documentation for setting up virtual users, including the command 'pure-db mkdb', and I always get "Authentication Failed" when I try the server with the virtual username. I tried other methods for weeks and I posted in their forum and they don't have a clue what's going on!

Is there anyone who has any ideas? Maybe different deamon? Different login script? I dunno.

Thanks in advance!
 
Old 05-13-2003, 10:12 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Hello,
I use PureFTPd myself. I remember I had problems at the beginning, but after you know how to set up an account, it's really easy. Here's set of commands I use to add another user:
pure-pw useradd someone -u ftpuser -d /home/ftpusers/someone
pure-pw mkdb
Where ftpuser is an ID (with no shell), /home/ftpusers is my FTP directory.
 
Old 05-13-2003, 10:23 AM   #3
remi
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat Linux 9.0
Posts: 16

Original Poster
Rep: Reputation: 0
Are you on the Red Hat distro as well?

I tried those commands, as documented, to add users. Yet, when I test my server and I login using the username I just made, it doesn't work. I just don't get it!
 
Old 05-13-2003, 11:37 AM   #4
remi
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat Linux 9.0
Posts: 16

Original Poster
Rep: Reputation: 0
Now I'm trying pure-ftpd again. It's now giving me the following error msg:

421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb
Login failed.
No control connection for command: No such file or directory

I tried deleting /etc/pureftpd.pdb and redoing it using 'pure-pw mkdb' ... but it's doing the same thing again when I test my server.

Any suggestions?
 
Old 05-13-2003, 02:30 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Do you have it from RPM or you compiled it yourself? If you did it yourself, do you remember which configure options you used?
Look if you have /etc/pureftpd.passwd. Add an entry 'pure-pw useradd...', but without mkdb and see if the new entry is added.
 
Old 05-13-2003, 03:17 PM   #6
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
If all of this doesn't work consider trying vsftpd. It supports virtual users 100% ... I'm using it :-)
 
Old 05-13-2003, 04:43 PM   #7
remi
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat Linux 9.0
Posts: 16

Original Poster
Rep: Reputation: 0
vsftp allows me to do virtual users, but doesn't allow me to do seperate directories for each of them, and that's my problem.

And I did install Pure-FTPd from the RPM; I didn't compiled it myself.
 
Old 05-13-2003, 11:37 PM   #8
remi
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat Linux 9.0
Posts: 16

Original Poster
Rep: Reputation: 0
Thumbs up IT'S WORKING!

GREAT!!! Nevermind! IT'S WORKING NOW!!!

I just rebooted and it solved the second problem.

Thanks to all of you!!!
 
Old 05-26-2004, 02:02 PM   #9
genexis
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
VSftpd Virtual users

Hello people, could somebody teach me how to add virtual users to VSftpd or ProFtpd ?

Virtual users as in they have their own login/password, and will be directed to their personal home directory and jailed there.

They will not be reflected in /etc/passwd

The examples in the ftp://vsftpd.beast.org only shows how to add virtual users all to one directory, so please help and guide me. Thanks.

I'm using Redhat 9.0.
 
Old 05-26-2004, 02:13 PM   #10
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
remi has said that VSftpd and ProFtpd supports virtual users, but doesn't allow seperate directories for each of them. So if you want unique directories for each user, use Pure-FTPD instead.
 
Old 05-26-2004, 02:15 PM   #11
genexis
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
If thats the case, how does Cpanel/Directadmin does it ? I believe they use proFTPd. Please give opinions thanks.

Btw, thanx for replying.
 
Old 05-26-2004, 03:47 PM   #12
elp
Member
 
Registered: Aug 2003
Posts: 66

Rep: Reputation: 16
Re: VSftpd Virtual users

Quote:
Originally posted by genexis
Hello people, could somebody teach me how to add virtual users to VSftpd or ProFtpd ?

Virtual users as in they have their own login/password, and will be directed to their personal home directory and jailed there.

I'm using Redhat 9.0.
For Proftpd ftpasswd is you friend, take a look at:

http://www.castaglia.org/proftpd/contrib/ftpasswd.html


ftpasswd --help

--home Home directory for the user (required).
 
Old 05-27-2004, 07:13 AM   #13
genexis
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
Thanks for the information. However, i've tried using proFTPD and the ftpasswd file, but still cannot seem to get it to work.
When compiling proftpd, must i specify an extra parameter or how else should I utilise ftpasswd file ?

proftpd.conf

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "Xoluxion Network FTP Server daemon"
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30

# Set the user and group under which the server will run.
User ftp
Group ftp

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
<Directory />
AllowOverwrite on
</Directory>

<Global>
RootLogin on
AuthAliasOnly off
</Global>


ftpasswd user parameter:

[root@nexus proftpd]# ./ftpasswd --passwd --name=chyenw --uid=3001 --home=/home/staff/genexis/.vusers/chyenw --shell=/bin/ftponly
ftpasswd: --passwd: missing --gid argument: default gid set to uid
ftpasswd: updating passwd entry for user chyenw

Password:
Re-type password:

ftpasswd: entry updated
[root@nexus proftpd]#


Please help, thanks in advance.
 
Old 05-27-2004, 07:28 AM   #14
elp
Member
 
Registered: Aug 2003
Posts: 66

Rep: Reputation: 16
You need to tell Proftpd to use that ftpasswd file, add this to your proftpd.conf:


AuthUserFile /etc/ftpd.passwd



or whatever you put your ftpd.passwd file
 
Old 07-27-2009, 11:20 AM   #15
lukaszp
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
I have the same problem as remi had. Can you tell me if it's supported to allow system and virtual users to use the FTP service at the same time? Or do i need to choose if only system or virtual users are FTP users?

My current configuration is set up to support both but at the moment only system users are getting through.

Also in one forum article (it was for Ubuntu but may still be relevant, is it not?) Eeqmcsq says that it's necessary to create soft link to tell pure-ftp to include virtual user authentication:

Quote:
sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50pure
Thanks for any help you can give.
 
  


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, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
FTP users prevent browsing to other directories mephesto Linux - Software 2 05-07-2005 10:03 AM
Apache, ftp and virtual directories yotamk Linux - Newbie 8 12-13-2004 04:41 PM
How to bind users to their home directories? trees Linux - Security 6 09-16-2004 05:32 PM

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

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