Preliminary replacement for gtkftpd FTP server
Posted: Sun 26 Jun 2005, 08:39
I can't get gtkftpd to work properly for me so I started looking for an alternative and decided to use betaftpd.
Despite its name it's not beta software, although it is pretty old. It will this will work for me although I'd like some feedback to make sure we can make it useful for most.
I had to mess with the code because it wouldn't compile under Vector Linux 5 STD, but I finally have it running in puppy.
The advantages first:
- doesn't require inetd or xinetd which is not available in puppy (in fact it won't work with inetd or xinetd)
- small: the executable I have is about 35k uncompressed, the author claims it can be reduced down to 20k although it's with an older compiler.
- fast and memory efficient
- easy to configure (there is no configuration to speak of)
- can be started at power up as a background daemon
- anonymous ftp works
The disadvantages:
- it doesn't have command line options, so if you want a feature it needs to be compiled in, and if it's compiled in it can't be turned off. The biggest feature where I could se this being a problem is with allowing uploads.
For my own use I want to allow uploads so I will compile it with uploads enabled, but that means that you can't prevent people from uploading to your server.
- when you log in, the root directory is that user's home directory. If you want to limit access to a particular directory you need to create a user and make that directory the user's home
- it will not let root log in, although I can remove that limitation by changing the program.
- it will not let a user log in that doesnt't have a password. I can probably remove that limitation althoguh my first attemt at doing so failed.
The two points above make sense from a security point of view, however in puppy you are generally the root user and that account doesn't have a passord. In fact passwd doesn't seem to wrok on root or spot.
I'm still playing with this and trying to figure out how it should be configured but I'm thinking about doing the following:
The install script asks you if you want to allow anonymous ftp. if yes, it creates a new user "ftp" with its home directory in /root/ftp (I have been thinking about changing the name of the anonymous user to "rover" in the code )
The install script asks if you want to create a passworded user and creates a new user with its home directory under root, for example /root/papaschtroumpf
menu entries in the WM menu: (or maybe a single entry that calls a script with the different options)
- start ftp server
- stop ftp server
- run/don't run at boot
- add user
when you choose any of those you'd get a pop up message that confirms it was started/stopped or would offer to toggle the boot state.
I'm not sure exactly how to write the add user, but basically it would create a new user with a home directory under /root, for example /root/papaschtroumpf
This way you can choose to have anonymous ftp fo everyone, and a few private accounts for your friends. each friend gets their own directory though, so you can't have friend A upload a file and friend B pcik it up, unless they know each other's password or use the anonymous account if it's there.
Personally, the main reason I want an FTP server is to use as a "poor man's Samba" so I only plan to use the anonymous account.
Let me know what you think.
Despite its name it's not beta software, although it is pretty old. It will this will work for me although I'd like some feedback to make sure we can make it useful for most.
I had to mess with the code because it wouldn't compile under Vector Linux 5 STD, but I finally have it running in puppy.
The advantages first:
- doesn't require inetd or xinetd which is not available in puppy (in fact it won't work with inetd or xinetd)
- small: the executable I have is about 35k uncompressed, the author claims it can be reduced down to 20k although it's with an older compiler.
- fast and memory efficient
- easy to configure (there is no configuration to speak of)
- can be started at power up as a background daemon
- anonymous ftp works
The disadvantages:
- it doesn't have command line options, so if you want a feature it needs to be compiled in, and if it's compiled in it can't be turned off. The biggest feature where I could se this being a problem is with allowing uploads.
For my own use I want to allow uploads so I will compile it with uploads enabled, but that means that you can't prevent people from uploading to your server.
- when you log in, the root directory is that user's home directory. If you want to limit access to a particular directory you need to create a user and make that directory the user's home
- it will not let root log in, although I can remove that limitation by changing the program.
- it will not let a user log in that doesnt't have a password. I can probably remove that limitation althoguh my first attemt at doing so failed.
The two points above make sense from a security point of view, however in puppy you are generally the root user and that account doesn't have a passord. In fact passwd doesn't seem to wrok on root or spot.
I'm still playing with this and trying to figure out how it should be configured but I'm thinking about doing the following:
The install script asks you if you want to allow anonymous ftp. if yes, it creates a new user "ftp" with its home directory in /root/ftp (I have been thinking about changing the name of the anonymous user to "rover" in the code )
The install script asks if you want to create a passworded user and creates a new user with its home directory under root, for example /root/papaschtroumpf
menu entries in the WM menu: (or maybe a single entry that calls a script with the different options)
- start ftp server
- stop ftp server
- run/don't run at boot
- add user
when you choose any of those you'd get a pop up message that confirms it was started/stopped or would offer to toggle the boot state.
I'm not sure exactly how to write the add user, but basically it would create a new user with a home directory under /root, for example /root/papaschtroumpf
This way you can choose to have anonymous ftp fo everyone, and a few private accounts for your friends. each friend gets their own directory though, so you can't have friend A upload a file and friend B pcik it up, unless they know each other's password or use the anonymous account if it's there.
Personally, the main reason I want an FTP server is to use as a "poor man's Samba" so I only plan to use the anonymous account.
Let me know what you think.