Code Monkey home page Code Monkey logo

Comments (3)

calmh avatar calmh commented on June 24, 2024

So you want files owned by Alice to become owned by Sean instead because the UIDs match, instead of going by account name? That seems a surprising implementation of sync-ownership to me, and I'm not really sure I get the use case.

Note that the user running Syncthing is irrelevant when using sync-ownership. It would typically need to be root or some privileged user anyhow.

from syncthing.

spkane avatar spkane commented on June 24, 2024

So, the more I think about this, the more I think it isn't a huge deal, but it does break Syncthing in a potentially unexpected way.

As for the use case, it isn't really a use case per se; it is simply how the systems are set up (and were set up long before Syncthing came into the picture.

You could also imagine it this way. You have a work computer where you are the only user, UID 500, but your username name is sean. You also have a home computer, where you have a shared account with your partner, called parents that has UID 500 and is the primary account that everyone uses on that system, and at some point you also created your own account named sean on that system and it got UID 501.

Now, if you run Syncthing on both systems under UID 500 and enable permission copying, I am pretty sure that it will fail, even if ALL the files are owned by UID 500. Now, if all files are owned by UID 500, there is likely no reason to turn on permissions copying, so in my case I just turned it off.

That being said, it seems like a bug that turning it on should break. Maybe allowing for this is not the right answer, and simply trying to detect and log the situation clearly would make more sense.

It was certainly confusing, and it is very likely an edge case, but it took a lot of troubleshooting to figure out what was likely going on, so the user experience was certainly challenging.

On a related topic, is there a way to get Syncthing to make use of sudo for the commands it needs elevated privileges for, so that it a list of command patterns could be added to sudoers to allow it to run chown, etc. on the defined sync folders?

from syncthing.

calmh avatar calmh commented on June 24, 2024

I think you are confusing ownership, permissions, and the user running Syncthing. It sounds like you just want to run it under the account you need and let the ownership follow the account.

Syncthing doesn't run commands per se, so cannot be integrated with sudo. You can run Syncthing under sudo, though.

from syncthing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.