You are not logged in.
Hey,
ever needed to share a directory between to computers? Usually this is done using NFS, FTP or Samba, which (IMHO) is a pain to setup when you just want to move some files around...
I've been looking for some simple sharing tool for Linux and I couldn't find one, so I decided to hack one myself
This is why I'm here to introduce you ShareMe, a folder sharing tool that's easy to use and easy to setup.
ShareMe is a small FTP server which will publish your directory, and users can download from it and upload files and directory there.
* No configuration files
* No manuals to learn
* Windows compatible (just fire up Explorer and use the builtin FTP client).
Just open a shell and run:
$ shareme -d ~/incoming/
and that's it!
By default ShareMe runs on port 1987 so there no need to run it as root. You can always change that behavior with the -P switch.
You can find it on AUR, package name shareme.
This is the first version, and I have some ideas I'd like to implement on the next version, so please try it and send me your feedback.
I'm looking for someone who can package/test it for other distros, let me know!
Project page: http://combo.cc/projects/shareme.html
Last edited by eazy (2009-05-26 10:59:34)
no masters to rule us, no gods to fool us
Offline
Great idea! Had to set up NFS the other day, which wasn't hard, but a bit time consuming and it feels a bit silly to fire up three daemons if you only want to transfer some pictures. I'll try it out.
Offline
Moved to Community Contributions.
Offline
nice tool, keep it up m8
Offline
Offline
Excellent idea and very clean implementation. Props!
I noticed a few indentation inconsistencies (spaces are marked with green, the rest are tabs):
Yea, I know, but I'm using "sw=4" and "noet" in Vim (4 spaces for indentation, which collapse to a tab every 2 indentation levels) so on different configuration this looks ugly, although Python likes this.
I'm fixing this on next releases
no masters to rule us, no gods to fool us
Offline
So it was easier to code this than to set up nfs/samba ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
You bet! The guys who code pyftpdlib should get all the merit! That FTP library is wonderful.
And my code is less than 1K.
Seriously, why should I need to configure Samba or NFS when I need to share something every 6 months...in 6 months I've had at least one reinstall, and have to configure everything from scratch
Btw, I'm working on a GTK+ ui. Something simple. KISS
no masters to rule us, no gods to fool us
Offline
Btw, I'm working on a GTK+ ui. Something simple. KISS
Er...
Other than that though, great project!
Dusty
Offline
Very handy
Thanks
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
You might want to look at daf-ftpd (Dumb as fudge ftpd). It's pretty badly written from what I remember though, I think it was using socket stuff directly instead of an ftp lib.
[git] | [AURpkgs] | [arch-games]
Offline
Nice job! One thing, it seems to have issues with directories containing spaces in the name.
Can you explain what you're experiencing?
I can share a directory with spaces in it:
shareme:$ ./shareme.py -d "/home/steph/dir with spaces"/
Serving FTP on 0.0.0.0:1987
And supports subdirectories with spaces...
Last edited by eazy (2008-10-10 08:42:32)
no masters to rule us, no gods to fool us
Offline
Offline
Nice job! One thing, it seems to have issues with directories containing spaces in the name.
Fixed in 1.0.1
no masters to rule us, no gods to fool us
Offline
Nice script! So simple! I love it. Keep up the good work!
Oh, and if you do make some sort of gtk frontend, please make it optional... I really prefer the cli.
Offline
Wow, I'm just looking for it, and I love it!
I suggest to add a function of secure sharing, then it'll be perfect.
By the way, how can I stop the sharing?
Last edited by cwjiof (2008-11-13 10:37:16)
Offline
Congrats, man. This just rocks. It can't be simpler.
Satisfied users don't rant, so you'll never know how many of us there are.
Offline
I will give this a try.. probably more handy than setting up a ftp server every 6 months when i need one
Last edited by Rasi (2008-11-13 14:39:54)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
@eazy,
Many thanks for a great little utility!
Offline
I gotta agree here! Great work!
Offline
I've been using this.. It also anounces itself over Avahi (if it's available)
PORT=9999
NAME="Files shared"
import os
import BaseHTTPServer, SimpleHTTPServer
try:
from subprocess import Popen, PIPE
avahi = Popen(['avahi-publish', '-s', '-f', NAME, '_http._tcp', str(PORT)],
stdin=PIPE, stdout=PIPE, stderr=PIPE)
except OSError:
pass
httpd = BaseHTTPServer.HTTPServer(('', PORT), SimpleHTTPServer.SimpleHTTPRequestHandler)
print '%s published over http.' % os.getcwd()
try:
httpd.serve_forever()
except KeyboardInterrupt:
print 'Finished.'
Offline
very nice. only problem is that it can't share multiple directories. For every other dir I have to start another instance on another port (or I'll get a backtrace about socket.error: [Errno 98] Address already in use). That's a real pity. It should be possible to call it again with shareme -d for another dir. maybe this could be made possible by making a dir with symlinks to the shares and the serving the dir. Though ftp doesn't like it when symlinks point outside the parent dir. In any case, you could also implement a switch to shut down the ftp server gracefully. So, it would be really neat to have:
- the ability to share multiple dirs through this script
- a shutdown switch.
Offline
also check out: "python -m SimpleHTTPServer"
Serves current directory and subdirectories on port 8000
Also there's 'woof' that serves a single file or .tar.gz'd directory on :8080
http://aur.archlinux.org/packages.php?ID=14135
Offline
I decided to use ShareMe again after quite a long break away so I downloaded version 1.0.2 from AUR. Unfortunately it fails when I try and run it:
$ shareme -d /home/user/tmp/
Traceback (most recent call last):
File "/usr/share/shareme/shareme.py", line 48, in <module>
server = server.ShareMeServer(user=options.user, password=options.password, directory=options.directory, port=options.port)
File "/usr/share/shareme/server.py", line 56, in __init__
self.ftpd = ftpserver.FTPServer(address, self.ftp_handler)
File "/usr/share/shareme/pyftpdlib/ftpserver.py", line 2991, in __init__
raise socket.error, msg
socket.error: [Errno 99] Cannot assign requested address
I tried using the newer pyftpdlib which is in the AUR, but same problem persists.
Any ideas how to fix this, anyone?!
PS: I've also got a slow DNS lookups problem at the moment - I've already checked the DNS servers and prohibited ipv6 modules from loading. Could these problems be related in some way?
Offline