Sharing subset of folders to different users


iElectric

Recommended Posts

I have a use case of about ~100 folders that are shared to ~5 users. Some folders are shared to all users, some are shared only to one.

I had the idea to have a global repository of folders symlinked to user specific btsync folder, but currently that's not possible due to symlinks not being followed.

Is there any solution without sharing folder one by one or duplicating storage?

Link to post
Share on other sites

The main problem with confusing BTSync into allowing you to have subshares is the *.!sync file.

You'll end up with the same file either being seen under multiple names or by multiple copies of BTSync.

This will cause corruption.

You can share space with aufs but you can't let either multiple copies of BTsync write to the same area nor can you let one copy see the same writeable area under different names.

BTW: This means that as it stands this wouldn't work if BTSync followed symlinks either.

Link to post
Share on other sites

Is there any solution without sharing folder one by one or duplicating storage?

Not at present, you would need to share each sub-folder independently, rather than sharing the parent folder. This would allow you to select which sub-folders sync between which devices, as each sub-folder will have its own unique "secret"

Link to post
Share on other sites

If these files are not ignored by default, then putting them on the ignore list wouldn't solve the problem?

SyncIgnore needs to be identical on all devices though - so you can't "ignore" some files/folders in a folder on one device, and other files/folders from that same folder on another device

Link to post
Share on other sites

I meant ignoring *.!sync files everywhere. I don't see how it would cause collisions this way.

Ah, I see! ...in which case, *.!sync files are ignored (i.e. if you place a *.!sync file in a folder you're syncing, it won't be transferred to other devices)

Link to post
Share on other sites

Ignoring the *.!sync files won't help (I expect they're already ignored anyway like the .SyncID file)

You'll only run into trouble with them if the file transfers overlap. So you have two remote peers trying to send data to what the local BT sees as two independent *.!sync files but are physically the same file. You won't end up with the earlier or the later. If you're lucky BTSync will do a final hash check on the *.!sync file, notice it doesn't match and try again. If you're unlucky it'll assume the *.!sync file is correct because it only ever wrote correct data to the file ... except it didn't.

This will only happen with large valuable files :)

Link to post
Share on other sites
  • 9 months later...

I have a use case of about ~100 folders that are shared to ~5 users. Some folders are shared to all users, some are shared only to one.

I had the idea to have a global repository of folders symlinked to user specific btsync folder, but currently that's not possible due to symlinks not being followed.

Is there any solution without sharing folder one by one or duplicating storage?

Symbolic links on Linux systems are still not followed, but you can useĀ 

mount --bind

to bind a folder tree to a different mount point in the filesystem.

You also need to put a line for each binding into the file /etc/fstab (on Ubuntu and similar systems), so the bindings are remade when you reboot the system.

This gets complicated, so I developed a Linux script to do it. I share the results with read-only secrets.

You can read about my script at

http://forum.bittorr...ymlink/?p=78762

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.