Saturday, 16 June 2012

Linux File Sharing Using Twistd

To share your directory with others on your network or even on the internet, you can use the twisted tool to share your folders.

Twisted is a python based tool, you need rpms like python-twisted-core, pyOpenSSL, python-zope-interface to install the too.

You can make use of the RPMforge rpm repo on yum to install the tool on your server or destop easily.

Sharing your folder on the web

# yum install python-twisted-core
 
# yum install python-twisted-web

$ twistd web --path /home/ -p 8081 &

Then go to browser and run
  http://192.168.1.183:8081/

To kill or end the twistd, use.

# killall -9 twistd

The above will start a web server on port 8081 sharing your /home directory. You can use http://<server-ip>:8081 to get the full list of /home directory on your web browser.

Sharing your folder on FTP

Similar to HTTP you can also use ftp protocol to start sharing. Just execute.

# twistd -n ftp -r /home/ &

This will start the ftp service on the default port 2121, you can use your ftp client on port 2121 to connect with your server.

3 comments:

  1. excellent jobs

    ReplyDelete
    Replies
    1. just try this as well,

      # python -m SimpleHTTPServer

      and in browser http://192.168.1.183:8000

      Delete