Het real path of a share.

Stef Bon stefbon at gmail.com
Wed Feb 13 08:00:16 MST 2013


Hi,

I'm writing a fs notify system (notifyfs) which I want to work with
network filesystems like sshfs, cifs and nfs.

The alpha version (under linux) is right now working with sshfs, and
should work with nfs.

It does that by not only setting a "system watch" on the localhost on
behalv of the client (under linux this means a inotify watch), but by
also forwarding the watch to the notifyfs service on the same host on
which the nfs, ssh or smb server is running.

This "server notifyfs service" is then watching the backend (again by
using inotify) and sends anything interesting back to the notifyfs
service on the host which send the watch in the first place.

Now with sshfs and nfs this is easy. I'm using some sort of url
notation (not a official format!) like sshfs:sbon@%HOME%, sshfs:/,
nfs:/home.

(the %HOME% template is required since the ssh server exports the home
directory when no directory is specified)

This url is send to the notifyfs on the server, where it is translated
to a real path.

With cifs I use the following format:

cifs:/public/some/path

where public is the name of the share.

Is it possible to parse this name and get the path, besides just
parsing the smb.conf directory?

Stef Bon
the Netherlands


More information about the samba-technical mailing list