Reset permissions plugin - stickiness ?

  • I have two drives mounted on two different systems, FS ntfs and ext4.

    I use and like what the Reset permissions plugin does, but here is the issue.


    After other apps or rsync or manually files get copied between those drives, I see permissions changed.


    Using the Reset permissions plugin would fix it, but I wonder if there is a way to make those permissions stick.


    Maybe it's unknown to me Reset permissions plugin functionality or possible a missing feature.


    In any case, what other people do in similar situation?


    Thx and have a nice weekend !

  • All the resetperms plugin does is reset the folders and files to the permissions that are set for the shared folder using chmod. There is nothing the plugin can do if another service changes the owner and/or permissions.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • To get the plugin to do that to multiple folders would require a lot of re-writing. If you just want to get it to run for the currently selected shared folder, just run /usr/sbin/omv-resetperms in scheduled job.


    Or you could make your own script to fix things:


    Call it fixperms.sh or something like that.

    Then run the script with

    fixperms.sh /srv/dev-disk-by-label-d1

    fixperms.sh /srv/dev-disk-by-label-d1 755 644 # use default perms

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

    Edited 2 times, last by ryecoaaron ().

  • Do you mean in the UI like here without any argument ?

    If you run the omv-resetperms from a scheduled job, it will operate on the "Public" shared folder you have selected in the web interface.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • All the resetperms plugin does is reset the folders and files to the permissions that are set for the shared folder using chmod. There is nothing the plugin can do if another service changes the owner and/or permissions.

    Maybe adding a feature to run resetperms on schedule would be a good idea?

  • Maybe adding a feature to run resetperms on schedule would be a good idea?

    That seems like it would be of limited use unless you could specify more than one folder.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • That's exactly what I meant !

    And as I mentioned a few posts up, changing to the plugin to work with multiple shared folders would require a lot of re-writing (which I don't have time for). I posted a quick script that you could use to do what you want in that same post.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I was more trying to get some useful outcome from this conversation for other users in the future :)


    Re: the script, I tried it and something did not work (I did not have time to see what was wrong), it was complaining that the path was not found. Does it work for you ?


    fixperms.sh /srv/05f0ef79-519c-499e-b152-06feafe3f207/Videos/

    Path not found.

  • Fixed with


    if [ ! -d "${sfpath}" ]; then

    echo "Path not found."

    echo "${sfpath}"

    exit 1

    fi


    Full script thanks to ryecoaaron :


  • WastlJ

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!