Another FTP Login Doesn't Work Thread

16 posts / 0 new
Last post
#1 Sat, 04/04/2009 - 17:14
mrwilder

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!

Sat, 04/04/2009 - 18:00
Joe
Joe's picture

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 install.sh 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.

--

Check out the forum guidelines!

Sat, 04/04/2009 - 18:21 (Reply to #2)
mrwilder

Ah yes, that fixed it.

Thank you!

Sat, 04/04/2009 - 18:59 (Reply to #3)
mrwilder

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.

Sat, 04/04/2009 - 19:24 (Reply to #4)
Joe
Joe's picture

<div class='quote'>But, if we want users to have a web site, won't the mail folder and other private folders be visible via the web?</div>

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. ;-)

--

Check out the forum guidelines!

Sat, 04/04/2009 - 19:26 (Reply to #5)
Joe
Joe's picture

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 &quot;Virtual Host Administration&quot;). ;-)

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).

--

Check out the forum guidelines!

Mon, 04/06/2009 - 09:24 (Reply to #6)
ronald
ronald's picture

i cant go into none of the 3 &quot;Doh! Give Users a Page, thrid try&quot; threads :/

Tue, 04/07/2009 - 08:38 (Reply to #7)
ronald
ronald's picture

there is actually a thread about this, look towards the end Joe pointing it out.
http://www.virtualmin.com/forums/help-home-for-newbies/preview-web-site-...

there are more threads about this I recall..

Tue, 04/07/2009 - 18:02 (Reply to #8)
mrwilder

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

The userdir module is set to load in httpd.conf

I added the line &quot;userdir disable root&quot; as well as &quot;userdir public_html&quot; 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?

Wed, 04/08/2009 - 05:55 (Reply to #9)
ronald
ronald's picture

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

<div class='quote'>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 &quot;Create under&quot; 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 &quot;newdomain.mydomain.tld&quot;. 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.</div>

Wed, 04/08/2009 - 12:51 (Reply to #10)
mrwilder

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.

Wed, 04/08/2009 - 19:53 (Reply to #11)
Joe
Joe's picture

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

--

Check out the forum guidelines!

Sun, 04/05/2009 - 08:43
mrwilder

I apologize for getting my &quot;users can't ftp in&quot; question all mixed up in my &quot;how do I give users a web page&quot; 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.

Mon, 04/06/2009 - 19:17
mrwilder

I can't either. I thought I must have an illegal tag or something, so I'll try to post it here using the &quot;code&quot; button:

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

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

[code:1]
/home/virtualdomainname/homes/username/public_html/index.php
[/code:1]

I edited httpd.conf thusly:

[code:1]
&lt;IfModule mod_userdir.c&gt;
UserDir public_html
&lt;/IfModule&gt;
[/code:1]

Using webmin, I &quot;Apply Changes&quot; and &quot;Stop Apache&quot; and &quot;Start Apache&quot;.

Then, I pointed a browser at
[code:1]
http://virtualdomain.com/~username[/code:1]

got a 404 error.

Mon, 04/06/2009 - 19:19
mrwilder

ARGH!!!

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:
[code:1]
httpCOLONSLASHSLASHvirtualdomainDOTcom/TILDEusername
[/code:1]

and got a 404 error.

Wed, 04/08/2009 - 19:51 (Reply to #15)
Joe
Joe's picture

<div class='quote'>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:</div>

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. ;-)

--

Check out the forum guidelines!

Topic locked