btsync shared folders permissions

  • I was a annoyed with BTSync, because I could not create a share without first creating the shared folder and give read and write access to the user btsync by acl .


    This post shows my solution, but it would be interesting to know two things:
    1 - If the solution presented here has some problem,
    and
    2 - if this was a problem only mine, or common to all . To assess the validity of posting a guide to this procedure .


    Well,
    After reading this guide (OMV General POSIX File System Permission Balance: chmod – chown – setgid - umask concepts) , I wondered if the user btsync belongs to users group.


    then, at the cli , I found that not.

    Zitat


    id myUser
    uid=1000(myUser) gid=100(users) groups=100(users)


    id btsync
    uid=114(btsync) gid=117(btsync) groups=117(btsync)


    with usermod , include btsync in users group.


    see the result :


    Zitat

    usermod -a -G users btsync


    id btsync
    uid=114(btsync) gid=117(btsync) groups=117(btsync),100(users)


    It was not enough , it was necessary to return the OMV web-gui , and save. (Actually I disabled btsync , saved , re enabled btsync and saved again)


    After that, I can create new shared folders, both in the omv webgui as in own btsync webgui.


    Thanks for any opinion, warnning( If I messed something), etc

  • The problem is not the plugin, is the btsync package ....


    OK, but....
    I really dont know how the plugins are made, but I wonder if the plugin couldnt have, at the end of the instalation process, a line with "usermod -a -G users btsync" or (chmod 777, as you pointed).

    • Offizieller Beitrag

    You can post the issue here


    https://github.com/OpenMediaVault-Plugin-Developers


    At the btsync section repo, i Think that could be added to the postinst script from the deb installer. Chmod is different because it wouldn't know which folder to apply since is the plugin installation not the folder selection.


    @HK-47 Did all of the coding, maybe he can give a hint if this is correct or not

  • We don't create the btsync user but that is something the btsync packages do. I don't add btsync to the users group because that would mean adding a user to a group that shouldn't necessarily belong in that group unless the user explicitly made it so themself. Adding the user to that group means that it then has read and write access everywhere the users group has it. That's not a good way of adding daemon users since they should only be allowed to read and write in directories the server administrator allowed them to. (Also, to me the users group is for actual "living" users, not daemon user and users like that.)


    So, adding the btsync user to the users group is fine as long as you do it yourself (since it's then you that made the call instead).

  • We don't create the btsync user but that is something the btsync packages do. I don't add btsync to the users group because that would mean adding a user to a group that shouldn't necessarily belong in that group unless the user explicitly made it so themself. Adding the user to that group means that it then has read and write access everywhere the users group has it. That's not a good way of adding daemon users since they should only be allowed to read and write in directories the server administrator allowed them to. (Also, to me the users group is for actual "living" users, not daemon user and users like that.)


    So, adding the btsync user to the users group is fine as long as you do it yourself (since it's then you that made the call instead).


    Ok, I understand your point, And I think it is right, but...


    Please, allow me to present an opinion.... that Is just my way to see, and may be wrong...


    This way, tha app "seems" not well integrated to the system. both the interfaces, the one in OMV and the btsync we gui have all the tools needed to create a new shared , but it is not possible only because btsync does not have the proper permissions. I do not know if the users group would be the correct tune, but is the one that works here.


    That said, what if the plugin had some check box that allowd the admin to decide .... see I am not thinking on me, I had my own solution, but i think it could be more friendly .

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!