Can't create virtual user in pure-ftp

Hi, I am stuck right now with something related to pure-ftp and, despite having googled for the whole morning, I can’t solve it out.

I have pure-ftp installed and working. I do the basic configuration to use authenticated users and I can create and login with a system user. I typed

#pure-pw useradd dhouard

After being asked for a password and do

#pure-pw mkdb

I can login with no more problem.

My problem starts when a try to create a virtual user. I type

#pure-pw useradd anotheruser -u dhouard -d /home/dhouard/public_html

And after typing

#pure-pw mkdb

with no error messages I can’t log in. The server recognizes “anotheruser” user but fails when I type the password.

I read that server has to be compiled with virtual user support. Is openSUSE rpm compiled without that option?.

Please help.

I assume wherever you got the reference “virtual user” actually refers to the FTP User which is its own set of application accounts, different than local login accounts or network login accounts and are used only within the FTP application.

IIRC pureftp is one of the ftp apps supported by the YAST FTP manager.

Save yourself headaches and generally avoid security mistakes by using the FTP manager.
If it’s not already installed, you can install it with the following, then you should find it in YAST > Network Services

zypper in yast2-ftp-server

TSU

Thanks for your reply.

Unfortunately, yast-ftp-server seems aimed to server configuration but there’s no user management tools in it. :frowning:

You’ll need to clarify what your problem is.
If you’re configuring the FTP server (pureftp in your case) then the yast tool should enable easy configuration of everything from the networking and security to files location to the Users permitted to access those files.

If you’re talking about the client-side app, that’s not pureftp (It’s only the server).

There are a number of ftp clients available in the OSS, and practically all should work, from the “ordinary” ftp app to more enhanced apps. You should even be able to use most modern web browsers as ftp clients.

TSU

Hi,

Maybe I’ve explained myself wrong. What I’m trying to do is create an ftp account in pure-ftp whose homedir is different from system user home. I mean, I’m able to create a user in pure-ftp which is the same than a system user. I have an system user called “dhouard”, whose home dir is /home/dhouard.

I can login on ftp server using a client and I can see a chrooted /home/dhouard. I am a php developer and, sometimes, I need to create an application that sends files through ftp, so I need to create a user in ftp server which chroots a folder in /home/dhouard/public_html, just when I’m developing the application.

But, whenever I try to create a ftp user passing as option that his home dir is /home/dhouard/public_html/whatever, even when the creation process is ok, I can’t log in (whit a ftp client).

I am afraid you assume to much fantasy in our brains :wink: Or you think we are doing in our day to day system management what you are trying to do, which is most probably not the case.

When you say “What I’m trying to do is create an ftp account in pure-ftp”, you better explain more detailed what you do. What configuration files do you edit, what do you put in there, etc. Or do you use YaST and when yes, what do you do there.

BTW, I have running pure-ftpd on a system. The only thing I did was checking that the users allowed to login with ftp are not in /etc/ftpusers (which, contrary to what it’s name may suggest, contains the usernames of the users not allowed to use the ftp daemon).

Spent some time looking at this.
First, I’d forgotten about the fact that there is a YAST bug regarding pureftpd, it’s supposed to be supported but is broken. I guess I’ll spend some time to create a bug report on this if it doesn’t already exist.

Also, I did find that the YAST applet has changed since I last looked at it.
Yes,
It now appears that you can’t create Users that aren’t already normal Users. So, I spent a little time exploring something new for me… If it’s possible to create a User without local login permissions. All the methods I found suggested on the Internet didn’t work for me (making the User a member of the sys or nogroup groups). One way I didn’t check but might work is the “-L” switch which is supposed to “disable” the account(??), I didn’t take the time to explore exactly what is disabled or not.

So, there appears to be 2 paths to your objective…

  • If you want to use YAST to at least partially manage your FTP, you’d have to change to vsftpd instead of pure-ftpd but you’d still need to figure out how to correctly configure User permissions to deny local logon.
  • You can continue to configure pure-ftpd manually. If you do this, I’d point you to the included documentation on your system. Besides the following command which displays help and examples for creating your FTP users, there are other similar config and help files in the same directory
less /usr/share/doc/packages/pure-ftpd/README.Virtual-Users

HTH,
TSU

Thanks, again, for all your replies. Unluckily, none of them worked for me. I have read, before posting here, the pure-ftp server documentation you point about creating virtual users with no success.

About using vs-ftpd instead of pure-ftp, I used to use (glup!) it but I had to change to pure because of some problem related to chrooting users.

Anyway, I’ll try to compile pure-ftp by myself. Maybe it’s all about a bug or the compile options of openSUSE rpm.