You are not logged in.

#1 2008-10-09 13:17:45

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

ShareMe - directory sharing for dummies

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... roll

I've been looking for some simple sharing tool for Linux and I couldn't find one, so I decided to hack one myself big_smile
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 lol 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! big_smile

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

#2 2008-10-09 13:33:57

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,221
Website

Re: ShareMe - directory sharing for dummies

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

#3 2008-10-09 13:36:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,838

Re: ShareMe - directory sharing for dummies

Moved to Community Contributions.

Offline

#4 2008-10-09 13:59:22

IsSuE
Member
From: Upper Austria
Registered: 2006-04-29
Posts: 309

Re: ShareMe - directory sharing for dummies

nice tool, keep it up m8

Offline

#5 2008-10-09 15:00:21

foutrelis
Developer/TU
From: Athens, Greece
Registered: 2008-07-28
Posts: 675
Website

Re: ShareMe - directory sharing for dummies

Excellent idea and very clean implementation. Props! smile

I noticed a few indentation inconsistencies (spaces are marked with green, the rest are tabs):

pu8s8mg7g2j5sxpepxpr_thumb.png    pnlmzejbe6022bvkmcyd_thumb.png

Offline

#6 2008-10-09 15:03:38

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: ShareMe - directory sharing for dummies

foutrelis wrote:

Excellent idea and very clean implementation. Props! smile

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 wink


no masters to rule us, no gods to fool us

Offline

#7 2008-10-09 15:12:52

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: ShareMe - directory sharing for dummies

So it was easier to code this than to set up nfs/samba ? wink


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

#8 2008-10-09 15:17:33

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: ShareMe - directory sharing for dummies

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 big_smile

Btw, I'm working on a GTK+ ui. Something simple. KISS wink


no masters to rule us, no gods to fool us

Offline

#9 2008-10-09 16:43:44

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: ShareMe - directory sharing for dummies

eazy wrote:

Btw, I'm working on a GTK+ ui. Something simple. KISS wink

Er...

Other than that though, great project!

Dusty

Offline

#10 2008-10-09 16:56:32

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: ShareMe - directory sharing for dummies

Very handy smile
Thanks


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#11 2008-10-10 00:25:20

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,418
Website

Re: ShareMe - directory sharing for dummies

Nice job! One thing, it seems to have issues with directories containing spaces in the name.

Offline

#12 2008-10-10 02:21:53

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: ShareMe - directory sharing for dummies

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.

Offline

#13 2008-10-10 08:42:18

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: ShareMe - directory sharing for dummies

Ghost1227 wrote:

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

#14 2008-10-10 22:36:30

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,418
Website

Re: ShareMe - directory sharing for dummies

i tried it with both

./shareme.py -d "/dir with spaces"

and 

./shareme.py -d /dir\ with\ spaces

both times it returned

'dir' is not a directory

Offline

#15 2008-10-13 22:13:07

eazy
Member
From: London, UK
Registered: 2008-01-20
Posts: 97
Website

Re: ShareMe - directory sharing for dummies

Ghost1227 wrote:

Nice job! One thing, it seems to have issues with directories containing spaces in the name.

Fixed in 1.0.1 smile


no masters to rule us, no gods to fool us

Offline

#16 2008-10-17 18:47:52

Odd-rationale
Member
Registered: 2008-02-05
Posts: 102

Re: ShareMe - directory sharing for dummies

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. big_smile

Offline

#17 2008-11-13 10:25:11

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: ShareMe - directory sharing for dummies

Wow, I'm just looking for it, and I love it! smile

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

#18 2008-11-13 12:15:46

denisfalqueto
Member
From: Belo Horizonte/MG/Brazil
Registered: 2006-03-24
Posts: 194

Re: ShareMe - directory sharing for dummies

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

#19 2008-11-13 14:31:37

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,844
Website

Re: ShareMe - directory sharing for dummies

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

#20 2008-11-17 20:28:11

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 694
Website

Re: ShareMe - directory sharing for dummies

@eazy,

smile Many thanks for a great little utility!

Offline

#21 2008-11-18 17:23:36

btartsa
Member
Registered: 2004-07-26
Posts: 222

Re: ShareMe - directory sharing for dummies

I gotta agree here! Great work!

Offline

#22 2008-11-21 06:09:03

damjan
Member
Registered: 2006-05-30
Posts: 320

Re: ShareMe - directory sharing for dummies

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

#23 2008-12-06 15:05:56

Shapeshifter
Member
Registered: 2008-03-11
Posts: 217

Re: ShareMe - directory sharing for dummies

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

#24 2008-12-08 15:27:55

greyarea
Member
Registered: 2008-09-30
Posts: 10

Re: ShareMe - directory sharing for dummies

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

smile

Offline

#25 2009-11-19 20:52:25

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 694
Website

Re: ShareMe - directory sharing for dummies

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?! wink

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

Board footer

Powered by FluxBB