i hear webmin works well with proftp.
Alright....just one more and I am done. I finally got apache up and running with name-based virtual hosts and now I need a way to transfer files to the server. I am looking to configure proftpd as my ftp server and want to use name-based virtual hosts just like in apache. First off....Is this even possible with FTP or am I just SOL on this? I've done some searching and cant seem to locate how to do it or even if I can.
Secondly....if I cant get get name-based virtual hosting to work I am just going to set ftp so me and my roomie can access it. We are the only two people that will ever need to access it. Any help with the configuration file would be appreciated. ;D
Thanks
Well, the named based virtual servers is only a http 1.1 thing. FTP protocol doesn't allow for that.
BUT since you have multiple A records in DNS pointing to that box, each should allow you to ftp to it. There is no configuration for each server though, only for users.
OK.....that is what I was getting from my various searching. Now on to the next part. Is it possible to have a user be placed in his/her www directory when they log in? What I mean is can I log in with my username and be dropped in my www folder while my roommate with his username will be dropped in his www folder? This is essentially all I need since its just a personal webserver to mess around with.
Also....if anyone has a proftpd config you would like to post that would also be helpful. I am trying to learn from the docs at www.proftpd.net but it is slow going.
Thanks again
Well, what I have done is set each user that I'm hosting web stuff for's home directory to their home directory.
SO, say I have user fred, barney, and dorris. *Thier web stuff is in
/export/users/fred/html
/export/users/barney/html
/export/users/dorris/html
So I set thier user accounts to be
/export/users/fred
/export/users/barney
/export/users/dorris
This way they get dropped into where thier html/ and thier bin/ directories are, so that they can put thier files where they need to.
Here is my proftpd conf file:
Code:# This is a basic ProFTPD configuration file (rename it to # 'proftpd.conf' for actual use. *It establishes a single server # and a single anonymous login. *It assumes that you have a user/group # "nobody" and "ftp" for normal operation and anon. ServerName * * * * * * * * * * *"j2solutions FTP server" ServerType * * * * * * * * * * *standalone DefaultServer * * * * * * * * * on # Port 21 is the standard FTP port. Port * * * * * * * * * * * * * *21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask * * * * * * * * * * * * * 022 # To prevent DoS attacks, set the maximum number of child processes # to 30. *If you need to allow more than 30 concurrent connections # at once, simply increase this value. *Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd) MaxInstances * * * * * * * * * *10 # Set the user and group that the server normally runs at. User * * * * * * * * * * * * * *nobody Group * * * * * * * * * * * * * nobody # Normally, we want files to be overwriteable. <Directory /*> *AllowOverwrite * * * * * * * *on </Directory> # A basic anonymous configuration, no upload directories. <Anonymous ~ftp> *User * * * * * * * * * * * * *ftp *Group * * * * * * * * * * * * ftp *# We want clients to be able to login with "anonymous" as well as "ftp" *UserAlias * * * * * * * * * * anonymous ftp *# Limit the maximum number of anonymous logins *MaxClients * * * * * * * * * *1 *# We want 'welcome.msg' displayed at login, and '.message' displayed *# in each newly chdired directory. *DisplayLogin * * * * * * * * *welcome.msg *DisplayFirstChdir * * * * * * .message *# Limit WRITE everywhere in the anonymous chroot *<Limit WRITE> * *DenyAll *</Limit> </Anonymous>
Alright....I kinda get it. *Basically the only users that have access to FTP are those that are users on the system....right? *So I need to have accounts on my box for say Joe and Sue and set their home directories to /location/of/users/html. *Now when they log in via FTP they get dropped in /location/of/users/html. *Does this keep them from browsing other directories of is that another setting that needs to be worked out?
Also...does this allow for uploading of files to the server or do I need to specifically declare upload capability?
well, with the permissions set I put on thier respective home directories, they can't change directories into the other users stuff, yet the internet is able to see the contents served up through apache.
this doesn't keep them from going out to the / and everywhere that a normal user would be able to do. In order to save that, you would have to chroot the ftp environment, which is a good idea anyway.
The config also allows them to upload, that's usually just a directory to directory setting.
Here is the settings for my users directories:
Notice how they are all grouped by apache, which has execute (cd permissions), but the users are not of group apache. So they can only change into thier own directory.Code:[root@anakin users]# ls -al total 44 drwxr-xr-x 11 root apache 4096 Sep 27 09:27 . drwxr-xr-x 5 root apache 4096 Dec 9 10:12 .. drwxr-xr-- 6 bert apache 4096 Dec 10 10:24 bert drwxr-xr-- 4 clouds apache 4096 Aug 9 09:28 clouds drwxr-xr-- 5 design apache 4096 Dec 4 17:32 design drwxr-xr-- 4 poo apache 4096 Aug 8 12:34 distro drwxr-xr-- 6 jester apache 4096 Dec 9 00:37 fool drwxr-xr-- 5 shadowfa apache 4096 Dec 9 13:10 gb drwxr-xr-- 4 poo apache 4096 Sep 27 12:53 hlcds drwxr-xr-- 3 loki apache 4096 Aug 15 08:36 loki drwxr-xr-- 4 poo apache 4096 Aug 8 13:59 poo
Good luck!
hmmmmm....my permissions dont look anything like that. I am thinking maybe I should change them. My html files are located in /var/www/ and then in subdirectories depending on virtual hosts. Everything is owned by root and in the root group. I am guessing this is bad ??? All my directories are set to chmod 411 as per the Apache manual to keep it from showing the directory contents when an index.html isnt found. I think I need to work on this aspect before I go diving into FTP and those various permissions, as I assume they will go hand in hand.
Yep. FTP uses the local file permissions, the same as apache does.
I havn't tried setting them to 411 or similiar, but this works for me, so I'm leaving it a that. (;
Bookmarks