iElectric

Sharing subset of folders to different users

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?

Share this post


Link to post
Share on other sites

Only with `mount --bind` and creating "sub-shares".

But there might be conflicts, I haven't thoroughly tested it and I'm sure there's a reason why it's not possible to create sub-shares properly. I posted in the whislist for real sub-shares, I hope they'll implement it.

Share this post


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.

Share this post


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"

Share this post


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

Share this post


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)

Share this post


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 :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.