Another FTP Login Doesn't Work Thread

I’m having an odd problem.

When I create a new virtual site, the virtual site’s administrator can ftp and log in to all the proper services, just fine.

However, when I as the super admin create a virtual site non-administrative user, that user can never log in via ftp and always gets a 530 Login Incorrect error.

When I look at the system logs, I see an error such as
proftpd[31291]: - FTP session opened.
proftpd[31291]: - no such user ‘anonymous’

Even though I am trying to log in as the non-admistrative user! Does anyone know why this might be? Does it have something to do with /etc/shells?

Thanks all!

Yes, FTP is determined by the shell. If the users shell is listed in /etc/shells, they will have FTP access. If it isn’t, they won’t.

The default in a Virtualmin system installed with is to use /bin/false as the FTP shell (which is also added to /etc/shells during the install). This allows the user to FTP but not ssh or command line login.

The shells granted for the various user types are configured in the System Customization->Custom Shells page.

Ah yes, that fixed it.

Thank you!

But, if we want users to have a web site, won’t the mail folder and other private folders be visible via the web? It sure looks like it from here.

But, if we want users to have a web site, won't the mail folder and other private folders be visible via the web?

What does a user website have to do with FTP? And why would a user website be configured to expose their private data? You’d want a public_html directory for website data. You certainly wouldn’t want to setup a website going straight to the users home directory. That’d be crazy. :wink:

Maybe the confusion here is that Virtualmin just doesn’t really target non-domain based websites. It’s not really interested in sites that are not name-based virtual hosts (it’s right in the name–Virtualmin stands for “Virtual Host Administration”). :wink:

UserDir is a single configuration option in Apache, and isn’t really related to virtual hosting…you either turn it on, or you leave it off. Virtualmin can’t really say much on the subject (though Webmin has support for enabling it and configuring it).

I apologize for getting my “users can’t ftp in” question all mixed up in my “how do I give users a web page” question, and for my apparent lack of general knowledge.

I’ll post the question in a separate thread.

Thanks again for helping me with the ftp problem. It works great now.

i cant go into none of the 3 "Doh! Give Users a Page, thrid try" threads :confused:

I can’t either. I thought I must have an illegal tag or something, so I’ll try to post it here using the “code” button:

I’m trying to create web sites for my virtual site users.

I created my test user’s folder in the “homes” directory of a virtual domain. I also created a “public_html” folder and added an index file therein. Thus, the path to that user’s default web page is physically:


I edited httpd.conf thusly:

<IfModule mod_userdir.c>
UserDir public_html

Using webmin, I "Apply Changes" and "Stop Apache" and "Start Apache".

Then, I pointed a browser at


got a 404 error.


I tried going to a URL that could be figured out by the way this thing would look if it would only let me type it in:


and got a 404 error.

there is actually a thread about this, look towards the end Joe pointing it out.

there are more threads about this I recall…

Well I don’t know what I’m doing wrong.

The userdir module is set to load in httpd.conf

I added the line "userdir disable root" as well as "userdir public_html" in the userdir block

I went to automatic virtual hosts and changed the Automatic virtual host root to /home/%0/public_html in the global default server.

Saved it, restarted apache, and it didn’t work.

SO I tried changing automatic virtual hosts Automatic virtual host root to /home/%0/public_html in the domain itself.

Didn’t work.

Can you think of anything I’m missing?

did you get the part at the end in that wiki article? Thats what I do when I need it occasionally.

Another way, which I believe is the best option (saving the best for last!) and most closely matches what you're currently used to without the security implications, is the Automatically create alias domain option (found in every Server Template, though to keep it simple you can just edit the Default template). Just select the radio button beside "Create under" and fill in the domain under which you'd like all of your customer domains to appear.

This option will cause Virtualmin to create a subdomain under your domain for every new domain you create–this will be immediately accessible with a name like “newdomain.mydomain.tld”. Easy to remember for the user (because it’s their domain name, plus the name of the company they’re hosting with), and it isn’t a path-based automatic thing, so non-virtual host home directories won’t be potentially exposed in any way, as with the Automatic virtual hosts method above (as used by Ensim, cPanel, and others, I reckon). If you need public access to sites, this is the method you really want. Note that this method also does not break SuExec, as the automatic hosts option does, so CGI scripts (and PHP once we get FastCGI+SuExec working) will run as the user that owns the domain…this is safer.

I did see it. Obviously it isn’t exactly what I need, but since I have very limited time, and for my purposes, it’ll probably be close enough… it’d probably be fine if I simply manually create a subdomain for a few users and just not give people ftp space in general… ehh… I’m not sure it’s going to save me work in the long run, though.

Surely somebody has solved this problem and got it to work.

I tried going to a URL that could be figured out by the way this thing would look if it would only let me type it in:

Yeah, this forum sucks horribly. It’s getting replaced soon. Apologies for the inconvenience. It seems you’ve run into more than your fair share of the bugs. :wink:

What’s in the Apache log(s) when you try to hit one of these user sites?