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 (similar to web and ftp or even on other ports).


How to install twisted on CentOS?


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.


Ssh your server as root.


  • # cd /usr/src
  • # Goto

Download and install the correct repo based on your os arch and version.

Now install the Twistd tool using.


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


Sharing your folder on the web.


Just execute the following command from your root shell to start sharing the directory online.


  • # twistd web –path /home/ –port 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.


This tool is extremely useful for the admins to share the directory/files on inter or intranet when scp or rsync tools are not much useful. Also you need to make sure you have the ports opened on your server/desktop end.