10

Is there a way to broadcast a network file sharing server that is using a protocol like ftp, sftp, webdav, so that it shows up in naulilus under network:// .

I once connected to network where I could see a ftp share. It was a red hat machine. I ask the user how he did this, but he did not know.

(Note: I do know how to do this for samba. I'm interested in how you do it for other protocols.)

3

1 Answer 1

9

You can announce services by using the avahi service. To announce a service, you have to add a service description file in the /etc/avahi/services directory. For example, to announce an sftp share, create a file sftp.service with:

<service-group>
  <name replace-wildcards="yes">SFTP on %h</name>
  <service>
    <type>_sftp-ssh._tcp</type>
    <port>22</port>
  </service>
</service-group>

For FTP you have to change the type to _ftp._tcp and the port to 21, for an NFS share you have the change the type to _nfs._tcp and the port to 2049, and you also have to include something like:

<txt-record>path=/path/to/someshare</txt-record>

The avahi.service man page has all the information on the format of these files.

1
  • +1, Fantastic! If it works that is.. :-) Dec 29, 2010 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .