FTP Server?
I am trying to set up a FTP Server, I am currently using proftpd and am looking to redo the way I manage my ftp users.
I dont want my users to have actual accounts on my server. So "Virtual Users" is a must. I want to be able to add/edit/delete users easily via a phpfrontend that I will write, so the userfile needs to be either mysql driven, or textfile driven. I have looked into proftpd-mysql, but cannot for the life of me get it to work, and there is virtually no good documentation on it that I can find. Does anyone have any suggestions for which ftpd server to use? And how should I configure it? I was thinking having 1 system user (ftpusers) and have all my "virtual users" within that (ftpusers) account. So the folder structure would go like: /home/ftpusers/user1 /home/ftpusers/user2 /home/ftpusers/user3 etc.. user1, user2 and user3 would all authenticate either through a database/textfile and then be chrooted to their respective dir. Is this how I should go about this? or is there a better way? I am starting my own webdesign/hosting company and am writing my own administration system with php, and I DO NOT want my clients to have shell access, or actual system accounts, so I want to avoid using the adduser command, unless I can strip it down to do JUST ftp. (I am also going to be hosting MANY domains, so would probably end up using the domain name as the username to keep them organized) ~Amish |
Here is a little tutorial on using the
AuthUserFile directive. Essentially, you create your own passwd file, and specify it in the /etc/proftpd.conf file. There is much more that you can do, and a utility already written to assist you. More information: http://www.castaglia.org/proftpd/doc...AuthFiles.html edit: Re-reading your message, I wanted to make a few suggestions. Read up on creating the public_html directory, and see how it can be used to your advanted. For example, I map domains www.domain.com to their /home/username/public_html directory. This is well-supported behavior in Apache. It defaults to exporting it to www.serversdomainname.com/~username but you can map that wherever you like, of course. Also, you can create a user without the ability to login locally with the command line, or you can edit the /etc/adduser.conf to automatically set their default shell to NOLOGIN when you add a user. This will keep them from being able to log in locally, as they will have no shell to log in to. I hope that helps, and let me know if you need anything else. |
Wolven-
Thanks.. Im familiar with the public_html dir, and that is what I have been using, only I changed it to www for my own purposes. For simplicities sake, I may just edit the adduser.conf file and call it addclient or whatever. Is there a way then, that I can have all the users created with that command be in a different folder? IE /home/clients/user1 /home/clients/user2 etc..? I would really like to keep my folder with my actual system accounts clear of all my client account. (I'll soon have over 100). Also, how hard would it be then, if I just used a modified adduser script to create the users, to change passwords and such via a PHP frontend? Thats one of my big requirements, because I dont want to go and have to log into the command prompt as root, and reset passwords every time a client forgot their password, or wants to change it. Thanks for the link to the tutorial, I'll check it out.. ~Amish |
No problems, and it shouldn't be hard at all. As a matter of fact...
http://www.webmin.com Have a look there. As for what to do about "local users" vs "web only" users, you could either create a script that did it for you, or just have two different adduser.conf files, and reference them with a parameter. For example if you copied the adduser.conf file and called it webuser.conf and had it edited to create them in a special directory (i.e. /home/clients/) then you could do this for your web clients: adduser -CONF /etc/webuser.conf |
I have had good luck using "glftpd"
|
All times are GMT -5. The time now is 04:52 AM. |