crdb Posted April 24, 2013 Report Share Posted April 24, 2013 Hello,I've started deploying btsync on linux for an LAN only replication project.I noted that all files synchronized get the ownership of the user running btsync.Is there a way - i guess it would require code change - to get file ownerships preserved upon replication?Thanks, Quote Link to comment Share on other sites More sharing options...
bradleyh Posted April 24, 2013 Report Share Posted April 24, 2013 Yeah -- I've just ran into this issue also. Quote Link to comment Share on other sites More sharing options...
crdb Posted April 24, 2013 Author Report Share Posted April 24, 2013 Feel like i could work this around with some default ACLs but it's definitely not clean Quote Link to comment Share on other sites More sharing options...
kos13 Posted April 24, 2013 Report Share Posted April 24, 2013 This feature is not implemented yet. Honestly speaking, I don't know how to implement it. Keep in mind that Sync is cross platform, so if you have file that is created by jon and synchronize it with Windows, how we should preserve the user name. Quote Link to comment Share on other sites More sharing options...
crdb Posted April 24, 2013 Author Report Share Posted April 24, 2013 I can understand that... but even keeping ACLs on windows is important - Goes with the whole attib/owner/acl whish.As you provide binaries for different platforms, why not support *platform way of doing things*, like indeed you'd lose informations while syncing between platforms but keep them while on the same one. Quote Link to comment Share on other sites More sharing options...
kos13 Posted April 24, 2013 Report Share Posted April 24, 2013 We plan to do this, but not there yet. Consider this case, you share a file with a friend, we won't be able to give the ownership user name to the file, even if both platforms are Linux. Quote Link to comment Share on other sites More sharing options...
crdb Posted April 24, 2013 Author Report Share Posted April 24, 2013 Not the username, but you can very well set the uid even if it's unknown to the destination system Quote Link to comment Share on other sites More sharing options...
LaMouette Posted April 26, 2013 Report Share Posted April 26, 2013 To get over that limiation, a simple way to do that would be a feature that enables to set the desired user/group for a share in the configuration file ?This would also enable the ability to sync different folder for different users and keeping some sort of acl ... Quote Link to comment Share on other sites More sharing options...
Automatic Coding Posted April 26, 2013 Report Share Posted April 26, 2013 We plan to do this, but not there yet. Consider this case, you share a file with a friend, we won't be able to give the ownership user name to the file, even if both platforms are Linux.I do see your issue, possibly storing the data else where in a 'meta-data' part of bit sync? Not part of the file itself?That's my best bet, I'm not too good with ideas... or linux.To get over that limiation, a simple way to do that would be a feature that enables to set the desired user/group for a share in the configuration file ?This would also enable the ability to sync different folder for different users and keeping some sort of acl ...This also would be an acceptable work-around, I'm currently having to run BTSync as some obscure user who has a really weird configuration (To allow it access to my local files, but, also allow it's files to be read by anyone but only executed and written to by others/etc) on my laptop so that all users can access the files. Quote Link to comment Share on other sites More sharing options...
crdb Posted April 29, 2013 Author Report Share Posted April 29, 2013 Actually if it could at least preserve file right modes it would be nice Quote Link to comment Share on other sites More sharing options...
zeut Posted April 29, 2013 Report Share Posted April 29, 2013 This is a critical feature for us. One solution would be to sync file meta data such as owner, group, permissions etc only when btsync is syncing between two like platforms (linux to linux, or windows to windows), or create a new config file option like "attempt_to_preserve_ownership_and_permissions" and then btsync does indeed sync these values when it can, but acts as it currently does in other cases such as when making a file public, or when syncing a file from linux to windows etc...We're very excited to use this tool as it's WAY better than what we're currently using to sync large file repos between our many remote locations, but losing file permissions and ownership / group info is a deal-breaker.Thanks! Quote Link to comment Share on other sites More sharing options...
crdb Posted April 30, 2013 Author Report Share Posted April 30, 2013 @kos13: Is it possible to make a bounty - as you don't want to open the source code - to have this feature prioritized ? Quote Link to comment Share on other sites More sharing options...
kos13 Posted April 30, 2013 Report Share Posted April 30, 2013 Can you please tell me more about use case and why it is important to you? I see too many issues with transferring file ownership in p2p environment. I'll give you few examples: - Linux machine doesn't have the same user in system, what Sync should do? If you will add the 3-rd Linux box, what should be uid for the file? - You have the uid but don't have permission to change it. - You changed uid on one Linux machine, should it be propagated to other?I understand how this should work if you own and manage two Linux boxes. In p2p environment, different OSes and different ownership of machines it is unclear to me how Sync should behave. I completely agree that for enterprise world this is must have feature, and we will do it. Quote Link to comment Share on other sites More sharing options...
crdb Posted April 30, 2013 Author Report Share Posted April 30, 2013 - Linux machine doesn't have the same user in system, what Sync should do? If you will add the 3-rd Linux box, what should be uid for the file?It doesn't matter, you should work with uid. And file can have a unknown UID on a Linux server this shouldn't matter- You have the uid but don't have permission to change it.Indeed daemon should run with sufficient rights to change UIDs... Else you set the ones from the user running the daemon as default- You changed uid on one Linux machine, should it be propagated to other?Why not ? This is still a file modification.As for mixed OS cases, there should be a way to detect it and use a safe default scenario...Like you push a file from Linux to Windows, you don't worry about keeping specific rights...Oh and for the use case:I want to use p2p transfer to sync files around the globe between servers. End user have no concerns what is used to synchronize, but the rights files have been pushed with must be kept between servers. Quote Link to comment Share on other sites More sharing options...
kos13 Posted April 30, 2013 Report Share Posted April 30, 2013 We are talking about Sync usage in enterprise world, where you control environment. My point was that for consumer world, transferring file ownership is generally a bad idea.As I said, we will have specific functionality that we want to do for enterprise, and ownership transfer is just a part of this activity. Quote Link to comment Share on other sites More sharing options...
zeut Posted April 30, 2013 Report Share Posted April 30, 2013 Glad to hear that this is part of the "enterprise functionality" that you're planning on adding. Any guess as to the ETA for these more enterprise type features? Quote Link to comment Share on other sites More sharing options...
crdb Posted April 30, 2013 Author Report Share Posted April 30, 2013 I can understand that you want to have this feature only in an "Enterprise" tagged version, but i disagree with you: It's NEVER a bad idea to sync file ownerships, even in consumer world.Anyway i can quite safely work around that behaviour with correct umask and group sticky bit settings. Now missing ACLs Quote Link to comment Share on other sites More sharing options...
roms Posted May 3, 2013 Report Share Posted May 3, 2013 For a workaround in "entreprise", we can sync first some directory then we can apply ACL using setfacl utility on Linux and apply groups permissions on folders.Folders in the applied ACL will get the same groups rights of the parent folder.Finally, we can make a cron job to re-apply ACL once a day (if need).That is what I will do and I will test on 2-3 shared folders over samba. Quote Link to comment Share on other sites More sharing options...
affinity Posted May 4, 2013 Report Share Posted May 4, 2013 For Linux users, why aren't you using rsync over ssh? There are lots of options for handling UIDs and other things. The only thing about running rsync is that it isn't live updates like btsync.... I use rsnapshot to backup Linux machines, it does so with intervals like hourly, daily, weekly, monthly and yearly; it uses rsync to do the job -- but that's nothing like btsync. Quote Link to comment Share on other sites More sharing options...
Xanza Posted May 5, 2013 Report Share Posted May 5, 2013 This feature is not implemented yet. Honestly speaking, I don't know how to implement it. Keep in mind that Sync is cross platform, so if you have file that is created by jon and synchronize it with Windows, how we should preserve the user name.You would have to detect the operating system of the client, and if it's being transferred from Windows to (l/u)nix then you could attempt to save it as root, but that would probably require that the BTSync daemon was spawned by root. Quote Link to comment Share on other sites More sharing options...
crdb Posted May 6, 2013 Author Report Share Posted May 6, 2013 For Linux users, why aren't you using rsync over ssh?Because the goal of using Btsync is having p2p file transfer between multiple servers... Quote Link to comment Share on other sites More sharing options...
tuxpoldo Posted May 6, 2013 Report Share Posted May 6, 2013 In my deployment concept for Linux and NAS I solve this issue by running more than one instance of BTsync, each instance running as a different user. The packages I created for Debian/Ubuntu permit to create multiple configuration files that generate an instance for each configuration file.See this thread for information about the packages. I will bundle the deployment scripts also in a separate archive for people running other distributions.If you are not using Ubuntu or Debian or you want only to understand how this kind of deployment works, download the btsync deployment scripts here. Quote Link to comment Share on other sites More sharing options...
Mowd Posted May 7, 2013 Report Share Posted May 7, 2013 For example, I sync web files between servers and I need to keep some directory are writable. Quote Link to comment Share on other sites More sharing options...
lux Posted May 8, 2013 Report Share Posted May 8, 2013 I can understand that you want to have this feature only in an "Enterprise" tagged version, but i disagree with you: It's NEVER a bad idea to sync file ownerships, even in consumer world.Is it just me or is it painfully obvious why it's a bad idea? I'm sharing files with my friend, obviously these need to be owned by his user on his PC and by my user on my PC...Speaking of platform-specific data (ACL) not getting lost on other platforms, http://www.nongnu.org/rdiff-backup/ has a very sexy approach. Quote Link to comment Share on other sites More sharing options...
crdb Posted May 8, 2013 Author Report Share Posted May 8, 2013 Let me rephrase it then:"It's NEVER a bad idea to *be able to* sync file ownerships"Then you can share your stuff with your friend, and i can tick a box that says "Preserve file ownerships" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.