21 posts / 0 new
Last post
#1 Sun, 10/08/2006 - 17:42
JohnRigby

FTP Access

Hi people, I THOUGHT I had it fixed.... must have been wishful thinking...... But I really need to get it work soon.. I DO read up on the system docs, but they are beyond my experience of many years.... but only with THAT Other One without these problems and I really don't want to become a Geek at my age.... :-)

No matter what I've tried to do to in Wmin/VMIN to access FTP functions, here is a random sample of errors encountered below. Also default skel presentation doesn't work. (Old problem but not important)

What I need is SIMPLE pointers to the how to INITIALLY set it up to go. The Server is still dead - never been able to get it to go properly after many, many months, so I can change anything necessary. Server has been completely reformatted and reinstalled twice already, runs on Fedora5.

While I did expect it to set itself up when installing new domains etc, ( like that Other One) it simply doesn't.

Altho using paid Vmin, it is not to be used as a hosting service, it was only to make my life easier to add in-house Domains smoothly.

Should I: give up and go back to Webmin only?

Or, (shock horror)go back to THAT one? ( Even my Server Farm Manager isn't that keen on it in security terms - a subject on which I'm paranoid - having been severely burnt before)

Here is the sort of thing I'm getting when trying to do a simple FTP upload at the moment. I've tried all the variants of protocols to use and can't understand why std ftp access doesn't simply put me into the user public_html. Or why it isn't "automatic" on Domain setup.

Sorry for the "novel" length, but I gotta decide something now.

TIA

*** CuteFTP 7.0 - build Jun  7 2005 ***

STATUS:> Transferring file "/index.html"... STATUS:> Resolving host name fablor.com... STATUS:> Host name fablor.com resolved: ip = 38.101.153.34. STATUS:> Connecting to HTTP server fablor.com:80 (ip = 38.101.153.34)... STATUS:> Requesting server... HEAD /index.html HTTP/1.1 Host: fablor.com:80 User-Agent: CuteFTP/7.0 Connection: Keep-Alive Accept: ., / Authorization: Basic aGltYWdhaW4uZmFibG9yLmNvbToqKioq

STATUS:> Receiving reply... HTTP/1.1 404 Not Found Date: Mon, 09 Oct 2006 10:43:15 GMT Server: Apache/2.2.2 (Fedora) Connection: close Content-Type: text/html; charset=iso-8859-1

STATUS:> 404 Not found. STATUS:> Resolving host name fablor.com... STATUS:> Host name fablor.com resolved: ip = 38.101.153.34. STATUS:> Connecting to HTTP server fablor.com:80 (ip = 38.101.153.34)... STATUS:> Requesting server... PUT /index.html HTTP/1.1 Host: fablor.com:80 User-Agent: CuteFTP/7.0 Accept: ., / Expect: 100-Continue Content-Type: application/octet-stream Content-Length: 13714 Connection: Keep-Alive Authorization: Basic aGltYWdhaW4uZmFibG9yLmNvbToqKioq

STATUS:> Receiving reply... HTTP/1.1 100 Continue

STATUS:> Uploading... STATUS:> Receiving reply... HTTP/1.1 405 Method Not Allowed Date: Mon, 09 Oct 2006 10:43:15 GMT Server: Apache/2.2.2 (Fedora) Allow: GET,HEAD,POST,OPTIONS,TRACE Content-Length: 306 Connection: close Content-Type: text/html; charset=iso-8859-1

ERROR:> HTTP Error.

Receiving reply... HTTP/1.1 405 Method Not Allowed Date: Mon, 09 Oct 2006 10:49:30 GMT Server: Apache/2.2.2 (Fedora) Allow: GET,HEAD,POST,OPTIONS,TRACE Content-Length: 318 Connection: close Content-Type: text/html; charset=iso-8859-1

ERROR:> HTTP Error.

Sun, 10/08/2006 - 19:09
Joe
Joe's picture

Hey John,

All of those sessions show you're trying to connect on port 80. FTP runs on port 20/21. You should use FTP defaults, if you're wanting to use FTP. Port 80 is for web requests <i>only</i>.

Virtualmin does setup DAV access which does run on port 80, but you have to specify an additional path of /dav to the end of the URL (and there have been reports that it doesn't work right on all systems...I'm still looking into this problem).

Try again using the defaults for FTP in your client (i.e. don't specify port 80), and let us know what happens.

--

Check out the forum guidelines!

Sun, 10/08/2006 - 23:13
JohnRigby

Hi Joe,
CuteFTP sets its own defaults as u select a protocol.
Here is a default Http on Port 80 (standard)

Uploading...
STATUS:&gt; Receiving reply...
HTTP/1.1 405 Method Not Allowed
Date: Mon, 09 Oct 2006 17:25:09 GMT
Server: Apache/2.2.2 (Fedora)
Allow: GET,HEAD,POST,OPTIONS,TRACE
Content-Length: 310
Connection: close
Content-Type: text/html; charset=iso-8859-1

ERROR:&gt; HTTP Error.

-------------------------------------------
Here is FTP on default 21:

The connection failed due to an error or timeout.
1) Verify that the destination host name or IP address is correct.
2) Increase the connection timeout threshold under Global Settings | Connection.
3) Switch to the opposite data connection type (PASV or PORT) under Site Settings | Type tab.
------------------------------------------------

I've tried every variable option I could think of to do a simple upload. I'm sure it is something simple - but shouldn't Vmin *automatically* set basic connections up when a new Domain is installed?
E.G. There is no auto setup of public_html apparently(?).

Is there a walk-thru anywhere in docs for doing/checking the setup for adding a domain? (AFTER using your easy install system? :-) )
Vis: After using the Vmin default to add a Domain, what else has to be done manually?

Why isn't the default directory public_html?

Thanks for the quick response -
John

Sun, 10/08/2006 - 23:59 (Reply to #3)
Joe
Joe's picture

Hey John,

Port 80 just isn't correct for FTP. Never will be. I'm assuming you've got a DAV option in the CuteFTP client that uses port 80. But that is <i>not</i> FTP.

The connection on port 21 is failing, and there are two obvious possible causes:

[list]

[*]Firewall. You can use the Linux Firewall module in Webmin (click the Webmin link in the left-hand menu, and then browse to Networking:Linux Firewall) to modify the firewall rules.[/*]

[*]ProFTPd isn't running. You can start it, and configure it to start on boot, using the Webmin Bootup and Shutdown module.[/*]

[/list]

FTP was confirmed working when I installed the system for you a couple of months ago (I checked because I knew you had had trouble with your previous installation), so something has changed since then. Not sure what.

If you wanna send over login details (hostname and root password) via email, I'll drop in and troubleshoot and fix whatever has gone astray.

<i>I've tried every variable option I could think of to do a simple upload. I'm sure it is something simple - but shouldn't Vmin *automatically* set basic connections up when a new Domain is installed?</i>

Of course. FTP, and all other services, are configured automatically. Something has broken in your configuration since I was last logged into your system. I don't know what.

<i>E.G. There is no auto setup of public_html apparently(?).</i>

No, that's not correct. The default domain owner home directory usually contains: cgi-bin domains etc homes logs Maildir public_html.

When you login as the domain owner via FTP, you should see those directories (some are optional...but public_html is always gonna be there, if you haven't explicitly disabled website hosting for that domain when creating the domain or in the Server Template you've selected for the domain).

<i>Is there a walk-thru anywhere in docs for doing/checking the setup for adding a domain? (AFTER using your easy install system? :-)
Vis: After using the Vmin default to add a Domain, what else has to be done manually?</i>

There is what's in the admin guide, and the resellers guide. I'm about to upload a server owners guide, as well, which will cover uploading content, installing scripts, etc.

But, Virtualmin does all initial configuration--the only thing a site owner should need to do is start uploading content (and, optionally, creating mailboxes, and other Virtualmin options--but none of these things are manual processes, only uploading content fits that description). All customizations you want to apply to some or all new domains can be done using server templates, modified skel directories, and module configuration.

I suspect we're just dealing with a misconfiguration of the FTP server or the firewall, however.

--

Check out the forum guidelines!

Sun, 06/07/2009 - 07:00
JohnRigby

Hi Joe and people,
Following my theory that most of the problems are permissions establishments:
SOME Scripts will install, some won't.
I haven't heard much of other users failing in this area, but I SURE have problems executing simple Script installs, too.
E.G. Faqmaster went on - even shows a logo - but no admin access possible.
PHPList just doesn't go at all it is lost b4 install.
Helpcenterlive - seems to install - no access. (login screen no action, error or otherwise, on user/password entry)
MediaWiki went on fine.
??????

FWIW................. :-{

Himagain

Mon, 10/09/2006 - 02:03
JohnRigby

Hi Joe,
SENT EMAIL DETAILS - THANKS!

Port 80 just isn't correct for FTP. Never will be. I'm assuming you've got a DAV option in the CuteFTP client that uses port 80. But that is not FTP.
********** Don't even know what DAV is... :-)
But I tried various options, none worked - including http=Port 80

The connection on port 21 is failing, and there are two obvious possible causes:

Firewall. You can use the Linux Firewall module in Webmin (click the Webmin link in the left-hand menu, and then browse to Networking:Linux Firewall) to modify the firewall rules.
*********** Will go study it.

ProFTPd isn't running.
******* Running ok

FTP was confirmed working when I installed the system for you a couple of months ago (I checked because I knew you had had trouble with your previous installation), so something has changed since then. Not sure what.
**** That's wot I thought.

If you wanna send over login details (hostname and root password) via email, I'll drop in and troubleshoot and fix whatever has gone astray.
******* DONE.

Of course. FTP, and all other services, are configured automatically.
********** THAT's good news

Something has broken in your configuration since I was last logged into your system. I don't know what.
********* THAT's bad. I have snooped but not really changed anything except to add a domain.

E.G. There is no auto setup of public_html apparently(?).

No, that's not correct. The default domain owner home directory usually contains: cgi-bin domains etc homes logs Maildir public_html.
*********** Right. Here is the beginning of the troubles, then.
I actually added them manually as they weren't there.

There is what's in the admin guide, and the resellers guide. I'm about to upload a server owners guide, as well, which will cover uploading content, installing scripts, etc.
******** Right! I'll be a good test subject - if *I* understand it...........

But, Virtualmin does all initial configuration-
*****That is wot I thought- it hadda be smarter than THAT other one. :-)

I suspect we're just dealing with a misconfiguration of the FTP server or the firewall, however.
********** I'll leave it alone till you have a look - would love to know what it is.....
same with the Script installs.... very odd.

Thanks again,

JOhn

Posted by Joe Cooper

Mon, 10/09/2006 - 02:31 (Reply to #6)
Joe
Joe's picture

Just so folks know how this one shook out:

The firewall had gotten reset to the default Red Hat firewall, which has to be opened up quite a lot for hosting--so I ran our standalone iptables configuration script, found here:

http://software.virtualmin.com/lib/iptables-setup.pl

With the command:

perl iptables-setup.pl

This opens up all hosting ports and the high ports (1024:65535).

Everything else looks fine on the system...skel directories are being generated correctly.

I'm gonna guess you're looking in the wrong place for the directories. Maybe logging in as a user other than the domain owner user. For example, if you have a domain called joeiskindaornery.tld, and the admin user of that account was &quot;joeiskindaornery&quot;, you'd have to login as that user in order to access files in that domain. Otherwise, you'll log into another home directory and won't have privileges within the domain home. If you logged in as a user named &quot;jrigby&quot; within that domain, you'd get the home directory of mail user jrigby--not what you want. It is possible to create additional FTP access users, but that's probably unnecessary in most cases.

--

Check out the forum guidelines!

Mon, 10/09/2006 - 05:04
JohnRigby

Hi Joe,
Thanks 4 the quick responses!

&gt;I'm gonna guess you're looking in the wrong place for the directories. Maybe logging in as a user other than the domain owner user. For example, if you have a domain called joeiskindaornery.tld, and the admin user of that account was &quot;joeiskindaornery&quot;, you'd have to login as that user in order to access files in that domain

**********Actually the /skel still doesn't work - I was referring to outside connection: http://fablor.com, arkadyr.com e.g., which still default to dir list and not the default from /skel.

However I can now get in via FTP!!!
Thanks! :-) :-)
John
Still can't see how that happened tho.....

Mon, 10/09/2006 - 11:13 (Reply to #8)
Joe
Joe's picture

Hey John,

<i>**********Actually the /skel still doesn't work - I was referring to outside connection: http://fablor.com, arkadyr.com e.g., which still default to dir list and not the default from /skel.</i>

Ah, you're expecting the skel files to be copied in every time you update skel. That's not the way it works--the skel comes into play only on domain creation.

You can have a default page served if you don't have an index.html file, just by dropping the following lines into /etc/httpd/conf.d/welcome.conf:

#
# This configuration file enables the default &quot;Welcome&quot;
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
&lt;LocationMatch &quot;^/+$&quot;&gt;
Options -Indexes
ErrorDocument 403 /error/noindex.html
&lt;/LocationMatch&gt;

The noindex.html file can be anything you want...

So, if you wanted it to be the index.html in /etc/skel to be your default &quot;welcome&quot; page, you'd copy it over to /var/www/error, and change the ErrorDocument line to read:

ErrorDocument 403 /error/noindex.html

I've done that for you. In your case, you have images, too, so I had to modify the file a bit and copy the images into /var/www/icon to make those work.

Of course, all of your newly created sites will get the public_html you've defined in /etc/skel, so they'll have actual files they can look at (which is preferable, IMNSHO, since folks often don't even know what to name their files to make them show up).

--

Check out the forum guidelines!

Mon, 10/09/2006 - 07:54
JohnRigby

Hi Joe,
Well, I CAN access the FTP side via my CuteFTPPro now, but although it SEEMS to accept uploads, they do appear in the dir list, they do not display! ??????

It's nearly midnite here in Godzone - I really need to go to sleep now after that!

Thanks for the help,

John

Mon, 10/09/2006 - 11:15 (Reply to #10)
Joe
Joe's picture

<i>Well, I CAN access the FTP side via my CuteFTPPro now, but although it SEEMS to accept uploads, they do appear in the dir list, they do not display! ??????</i>

I dunno. Where did you put the files, and what are their names? I'll have a look.

Only files in public_html should be accessible--so if you put files into /home/domainname, they aren't going to show up (and they shouldn't show up) when you hit the website URL.

--

Check out the forum guidelines!

Tue, 10/10/2006 - 23:00
JohnRigby

Hi Joe,
Thanks for that - definitely ghosts.... :-)
We are getting there, getting there.....

Two things happening now are:
1. I'm uploading to the public_html dir - it is showing up as there, but not active.
2. My uptime check program can suddenly not ping any of the Domains except the primary http:/fablor.net.
It was working previously ok.
Won't even ping the IP address.
Error message is &quot;403 Forbidden&quot;

I really am trying to understand the beast/s...... :-(

Himagain......

Wed, 10/11/2006 - 02:31 (Reply to #12)
Joe
Joe's picture

<i>1. I'm uploading to the public_html dir - it is showing up as there, but not active.</i>

I don't know what this means--I see files change when I change them on your system, these just isn't any mechanism for what you're describing to occur (i.e. it aint possible). Are you sure you aren't just seeing cached content? (Hit Ctrl-F5 to do a forced refresh in IE, or Shift-Reload in Mozilla/Firefox.)

<i>2. My uptime check program can suddenly not ping any of the Domains except the primary http:/fablor.net.
It was working previously ok.</i>

Be specific. I see fablor.com, netcapitalisation.com, god-from-the-machine.com, fablor.net, all answering fine.

--

Check out the forum guidelines!

Tue, 10/10/2006 - 23:05
JohnRigby

continued........

I'm trying to just replace the default index.html (from the /skel original)even renamed it xindex.html and the new one loads fine via FTP all the details seem ok, but no new display.

Himagain

Tue, 10/10/2006 - 23:11
JohnRigby

and again.........
have tried to upload to http://netcapitalisation.com just now from a clean start and same odd problem.
ping is still failing on all but fablor.net (main)

john

Wed, 10/11/2006 - 02:34 (Reply to #15)
Joe
Joe's picture

&lt;a href=&quot;http://netcapitalisation.com&quot;&gt;Works alright for me.&lt;/a&gt; (Remember to hit Ctrl-F5 if using IE, or Shift-Reload in any Mozilla-based browsers, to be sure you're seeing what's actually on the server rather than what's in your browser cache.)

--

Check out the forum guidelines!

Wed, 10/11/2006 - 06:49
JohnRigby

Hi Joe,
Well, curioser and curioser said the cat..........
Yes, I made sure it wasn't a cache problem.
I've just ftp'd in and www.netcapitalisation.com still shows my old attempt to change index.html and strangely YOUR alteration is displaying in Browser, not in file listing.

What did you actually do? Vis: where/how did you change the display and it not show in a CuteFTP Site dir displaY?
Your entry also does not show anything but text when viewed as Source via Browser.

The &quot;ERROR 403 FORBIDDEN&quot; is still coming up on my Site Checker for the domains:
www.fablor.com
www.god-from-the-machine.com
www.arkadyr.com

But NOT for
www.fablor.net
www.netcapitalisation.com

Cheers?

John

Wed, 10/11/2006 - 15:36 (Reply to #17)
Joe
Joe's picture

Hey John,

Ah, I see the difficulty. You've confused &quot;Sub-server&quot; with &quot;Alias server&quot;. You wanted Alias servers, but you created Sub-servers. Sub-servers are complete domains all on their own--they get their own website directory, their own mailboxes, their own databases, etc. They get everything your fablor.net domain has--they just happen to belong to the same user, and live in a sub-directory within the fablor.net home directory. Sub-servers are for convenience of delegation of many domains to one domain owner, and <i>not</i> so that the domains can share the same content. Sharing the same content between Sub-servers would be a bug.

e.g. You've got a bunch of sub-server within your &quot;him&quot; account, in addition to the one parent fablor.net server located in /home/him. They each get a home directory:

/home/him/domains/fablor.com
etc...

If you want the all to have the same content (what you're putting in /home/him/public_html), you don't want multiple servers--you just want them to be alias servers.

To be specific:

Your domain fablor.net is displaying exactly what you upload to /home/him/public_html. Just like it is supposed to.

Your other domains are either displaying what I put in them, or the default welcome page that I setup for you. Just like they're supposed to, but not what you intended.

To make all of those other domains, instead, display what is on fablor.net, you need to create them as alias domains. They do not need to be separate domains that happen to be owned by the fablor.net domain owner (him).

To do that:

[ol]

[*]Delete the offending domains (presumably all of the sub-domains of fablor.net, since those seem to be the ones you want this content to appear on), by selecting them in the domains dropdown list in the left menu, and then click Delete Virtual Server in the Disable and Delete menu. Choose to delete everything in the domain and confirm the deletion.[/*]

[*]Select fablor.net in the dropdown domains list in the left-hand menu. Open the Create Server menu, and click Create Alias Server.[/*]

[*]Fill in the domain name and description. Leave the various options checked, so it will setup mail, DNS, and web configuration for the domain. Click &quot;Create Server&quot;.[/*]

[/ol]

You're done. Now, when you upload content to fablor.net, it will show up on fablor.com, netcapitalisation.com, etc. just like you've been expecting all along.

Oh, yeah, on this count:

<i>
The &quot;ERROR 403 FORBIDDEN&quot; is still coming up on my Site Checker for the domains:
www.fablor.com
www.god-from-the-machine.com
www.arkadyr.com
</i>

Yeah, that's kinda sorta accurate, but not really. The 403, which is definitely an error condition that the site checker is responding to, is redirecting to the welcome message, so the site is showing up (and you can see with your own eyes that content is being served, if you browse there). Blame Apache for the way it handles the welcome message if your site has no content...site checkers should be smart enough to deal with it, but I doubt there are many that are (ours in the System and Server Status module is not smart enough unless you give it some bonus configuration details). But the sites are behaving exactly as they are supposed to be. i.e. You've gotta just move past this question--the site checker (including ours) is not smart enough to see past the first response from the server. You, and every other human that looks at your site, will see exactly what you are supposed to see. I'll see about getting the System and Server Status module capable of handling redirects with grace.

Speaking of Server Templates, I notice you've broken your skel setting in the Default Server Template, by setting it to /etc/skel/public_html. This would screw up the path on the copied files--they'd end up not in public_html but in the base directory. I've corrected that.

--

Check out the forum guidelines!

Wed, 10/11/2006 - 17:48
JohnRigby

Hi Joe,
Thanks again for your patience - take an extra ten bucks out of the cash register and go home early and get drunk......

Actually my original intention was to SIMPLIFY my admin!

Each Domain is to be different content. It was only to have a default screen on startup while working on that particular Site.

As for Admin it can all be by one name access, but I was thinking ahead and having different &quot;managers&quot; able to access that particular domain. (like a Reseller deal)

So it looks like the cleverest thing for me to do now is delete all the aliases and sub-domains and install/re-install any new domains as separate entities, using your fab installer, correct? :-) :-)

Cheers,
John
&quot;It won't happen overnight, but it will happen.&quot; (Cosmetic ad for anti-wrinkle cream) :-)

Wed, 10/11/2006 - 18:03 (Reply to #19)
Joe
Joe's picture

<i>Each Domain is to be different content. It was only to have a default screen on startup while working on that particular Site.

As for Admin it can all be by one name access, but I was thinking ahead and having different &quot;managers&quot; able to access that particular domain. (like a Reseller deal)

So it looks like the cleverest thing for me to do now is delete all the aliases and sub-domains and install/re-install any new domains as separate entities, using your fab installer, correct? :-) :-)</i>

If you want different administrative users for each domain, then you need to make them owned by different users--you've got them all operated by user &quot;him&quot; right now. You don't necessarily have to re-create the servers, as there is a way to re-assign ownership (and convert to a parent domain that isn't inside of another domain's home directory). But since you've got nothing in them, and you want to create an administrative user for each domain, it is definitely easiest to just delete them and start over, as you've suggested.

Though I should clear up terminology a bit:

<i>install/re-install any new domains as separate entities, using your fab installer</i>

No. You'll never run the installer (install.sh) again. The installer is for installing Virtualmin, and nothing else.

You use Virtualmin's Create Server menu to create sub-server, sub-domains, aliases, etc.

I'm sure that's what you meant, but just wanted to be sure. ;-)

--

Check out the forum guidelines!

Wed, 10/11/2006 - 23:09
JohnRigby

Hi Joe,

Yes! Very good idea! :-)&lt;p&gt;

&lt;i&gt;Though I should clear up terminology a bit:

I'm sure that's what you meant, but just wanted to be sure. ;-)&lt;/i&gt;

&lt;/p&gt;
Yes, I did mean to use the fab Virtualmin Tour Video as a precise guide and to go re-create the Virtual Servers.
&lt;p&gt;
Thanks again!
&lt;/p&gt;
John

Topic locked