Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Dec 2014, 06:58
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Preliminary replacement for gtkftpd FTP server
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Sun 26 Jun 2005, 04:39    Post subject:  Preliminary replacement for gtkftpd FTP server  

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 Smile )

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.

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Sun 26 Jun 2005, 04:52    Post subject:  

Here's the current version of the server, although it's subject to change.

EDIT: mozilla couldn't upload the file while running from puppy???? will try again from another machine.
OK I figured it out, I didn't have an extension to the file because I didn't tar.gz it. Well it gave me a chance to test my theory of using FTP as a replacement for Smaba: I opened a browser and used anonyous ftp to retrieve the file from puppypc to the machine I'm using now.


1) place it somewhere (I'm thinking /sbin?)
2) for anonymous FTP create a user called ftp with the home at /root/ftp:
adduser -h /root/ftp ftp
(will prompt you for a password but ftp will ignore it since it's the anonymous account)
3)run the server by clicking on it or on the command line:
./betaftpd &

Logging is not working, I thought I had enabled logginf to /var/log/... I'll look into it. I'm not sure how I feel about logging anyway, since it could be filling RAM with logs when booting from a CD with no HD access.


This is still in the experimental stage, so use at your own risk

Also betaftpd supports shadow passwords but I don't think this version has that option enabled.


Finally I think that I may hack the program has follows:
- allow user "root" to log in
- don't allow user root to log in without a password, however since I puppy root doesnt't have a password, when you try to log in as root, the server will look up a "dummy root user" and try to match the password entered to the password of the dummy user, even though it will share everything in /root
betaftpd.tar.gz
Description  experimental - see setup instructions in the post above. I will make a dotpup and/or unleashed once everything is sorted out.
gz

 Download 
Filename  betaftpd.tar.gz 
Filesize  17.67 KB 
Downloaded  601 Time(s) 

Last edited by papaschtroumpf on Sun 26 Jun 2005, 05:18; edited 1 time in total
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: Sun 26 Jun 2005, 05:04    Post subject:  

Cool

I think my medication must be wearing off because I could not find the file - did you teleport it in some unusual manner?

Rolling Eyes

I appreciate you are green - but are you related to Papa Smurf? What style of Karate do Smurfs do incidentally? I used to do Mugendo and Mushindo - but I was rubbish - people used to attack me all the time - sometimes even during the class.

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Sun 26 Jun 2005, 05:21    Post subject:  

I had trouble uploading the file because I hadn't tarred and gzipped it. It's there now.

Schtroumpf is French for smurf Wink Sounds about like what you'd expect too (somewhere short of a sneeze).

I practice the Shotokan style of Karate. They teach you to run if attacked Very Happy


3:45am, time to hit the sack, I'll play with FTP servers later...

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: Sun 26 Jun 2005, 06:08    Post subject: Morizot Firewall  

papaschtroumpf wrote:

I practice the Shotokan style of Karate. They teach you to run if attacked Very Happy


tee hee - and he ain't joking. I did one Shotokan class and that is indeed what they taught me. Non-lethal and multiple attacker friendly too.

Talking of self defense . . . The Morizot Firewall seems to be very simple and good (it doesn't bother me and I do not bother it) - perhaps worth putting on by default?

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Mon 27 Jun 2005, 02:31    Post subject: Re: Morizot Firewall  

Lobster wrote:
Non-lethal...
We could if we had to... Shocked


Back to the subject. I have now spent more time on an install script and a "Control Center" than on porting the software itself.

The install script install the software, creates the "ftp" user and inserts a menu item in the fvwm95 start menu under "Networking" but not in JWM or iceWM yet.
There is also no uninstall facility.

The item installed in the menu is my homebrewed "control center":



The HELP button does nothing either.

I need to create an html man page since betaftpd doesn't have one.

The compile options I settled on are:
--enabled-upload so that you can upload files to the server
--enabled-xferlog to provide a lof of all transfers. I discovered that if the log file doesn't exist when the program is started, it will not log anything, so that's what I use in my "Control Center" to enable and disable logging.
--enabled-fork the server runs silently in the background, "daemon-style"

The options I decided to not enable are:
--enabled-nonroot allows non-root users to start the server. it seemed somewhat flaky and puppy runs as root most of the time anyway
--enabled-dcache caches the content of the directories so that "ls" commands on the server are faster. Also seemed a little flaky, not updating the list properly. It also made the app larger and use more memory
--enable-message enabled the welcome message / message of the day. I don't care for that deature and the readme says that it's not very intelligent and will display the message every time you display that directory
--enable-shadow puppy doesn't seem to use shadow password, so removing support for it kept the executable smaller
--enable-ascii who does ascii transfers nowaday? transferring text file s in bin mode works just fine.
--enable-stat consumed more memory and more code to to support he STAT command (user statistics?) didn't seem useful in a lightweight server.

I'll upload a tarball shortly for those of you that want to give it a try. Not ready to create a dotpup yet.

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Mon 27 Jun 2005, 03:44    Post subject: Near-final version of replacement for gtkftpd FTP server  

Here's something close to a final version. Let me know what you think.
The safesst way to test this if you're worried about messing up something is to do a mode 2 install so that if something goes wrong, you can reboot and start clean. Not that anything will go wrong Very Happy

I need to do a little more testing of the installation scripts and add support for other WMs and an uninstall function.

When all that is done I intend to make both a dotup and an unleashed.

Barry, what do you need exactly to make a sorcerer package, do you have instructions yet?
BetaFTPD-1.tar.gz
Description  unar.zip, cd into it, run installftpd.sh
gz

 Download 
Filename  BetaFTPD-1.tar.gz 
Filesize  20.33 KB 
Downloaded  673 Time(s) 

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7099
Location: Perth, Western Australia

PostPosted: Mon 27 Jun 2005, 07:27    Post subject:  

Sourcerer, no, but I will upload a "core" package hopefully at the same time as 1.0.4 is released. It will have all the instructions in it.
Back to top
View user's profile Send private message Visit poster's website 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Tue 28 Jun 2005, 03:42    Post subject:  

I think I'm statisfied with the final product. Ill definitely be usng it myself.
See therelease thread here: http://www.murga.org/%7Epuppy/viewtopic.php?t=905

Is there a list of PupGets on the Wiki or does everyone else do DotPups?

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0795s ][ Queries: 12 (0.0044s) ][ GZIP on ]