FTP to Web Directory

Discussion in 'ISPConfig 3 Priority Support' started by BobGeorge, Aug 16, 2017.

  1. BobGeorge

    BobGeorge Member HowtoForge Supporter

    Now that the FTP appears to work - I cold booted the cluster and it just worked, so I clearly had some wrong setting somewhere that I'd made, which a cold boot cleared out - there's one tiny modification I'd like to make.

    I'd like it so that the FTP was confined to the web directory only and not the user directory above it. We've not going to be providing SSH access - at least, not initially - so they don't need to see that directory. Just the DocumentRoot directory.

    How would I do this?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    FTP users have no user directory. I guess you mix up FTP/FTPS with SSH(SFTP) here.
  3. BobGeorge

    BobGeorge Member HowtoForge Supporter

    Okay, doing load balanced FTP via an NFS share is just asking for trouble.

    When I delete a file, as the website files are on an NFS share, NFS doesn't actually remove them but rename them to ".nfs" followed by a long random number. This is not great.

    But rather than mess around with all this, I'm thinking that the FTP function won't be used that often, so it doesn't need to be load balanced with everything else and I'll just make the storage server itself the FTP server for the cluster.

    So I've made the changes to the server services. I've ensured that FTP communications are routed to the storage server instead (and this is working, as we're getting back intelligent and readable responses from pure-ftpd).

    But when I try to login, it won't let me, with an authorisation failure. I deleted and recreated the user, making sure that the username and password are exactly right. I also tried this at the command line with the "ftp" command directly. All is well, until I need to logon and then it just refuses. I'm not authorised.

    I tried the "resync" until the tools menu - in case, by changing the cluster configuration around, something got confused - but this doesn't help.

    I've looked at the pure-ftpd configuration on the storage server and it's the same, with TLS = 1, and the ForcePassiveIP and PassivePortRange stuff needed to squeeze it through my load balancer.

    Although, as I say, the FTP server is responding just fine - so I don't think it's a communication issue (and this is the same setup I used earlier for the other servers, which worked properly, just moved to another server) - but it's an authorisation issue.
  4. BobGeorge

    BobGeorge Member HowtoForge Supporter

    Yes, I've looked in the "ftp_user" table of the "dbispconfig" on the shared storage and it returns an empty set.

    But doing the same thing on another node gives me the expected FTP user data.

    So the databases are not the same.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to edit the ftp user in ispconfig and save it, does it apper after about a minute in the slave db? if not, then there is a connection problem of the slave ispconfig to the master. use the debug mode to find out why it fails.
  6. BobGeorge

    BobGeorge Member HowtoForge Supporter

    In the debug log, I see these two repeatedly appear:

    Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.

    What does this mean?
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    This means that the named plugin is executed. If you don't see any further output, then there were no other pending changes. Did you set this server to be a mirror of the master in ispconfig?
  8. BobGeorge

    BobGeorge Member HowtoForge Supporter

    I added this server as a slave of the master when I installed ISPConfig, but it if not configured to be a mirror.

    Wait. Just wondering. Is it permissible to have a server be a "fileserver" without it also being a "webserver"?

    Because though this does make sense in my situation - as I have the website files on a shared storage server - that's something I've done with NFS myself, and so ISPConfig probably doesn't appreciate this?

    Could that be the problem?
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You will not get any FTP users when it is not a mirror as FTP users are part of a website.

    You can do that, but the server is a web server in that case as well. If you don't want to get apache config files on that server, then disable the apache plugin by removing the symlink in plugins-enabled folder.
  10. BobGeorge

    BobGeorge Member HowtoForge Supporter

    I ran "server.sh" on that server and it's saying access denied for "ispcsrv9".
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you have a connection problem. Compare the master database details in the server config.inc.php file from ispconfig with the ispcsrv6 user in your master mysql server.

Share This Page