openmediavault-emby plugin (formerly mediabrowser)

  • Hi gang, I keep getting this error when activating MediaBrowser.


    Zitat

    Error #4000: exception 'OMVException' with message 'Failed to execute command 'omv-mkconf mediabrowser moveDbFolder 2>&1': update-rc.d: using dependency based boot sequencing insserv: warning: current start runlevel(s) (empty) of script `mediabrowser' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mediabrowser' overrides LSB defaults (0 1 6). Moving database from </var/lib/mediabrowser> to </media/9b302b5e-387c-4a12-86b7-74f5df36047b>... chown: changing ownership of `/media/9b302b5e-387c-4a12-86b7-74f5df36047b/aquota.group': Operation not permitted chown: changing ownership of `/media/9b302b5e-387c-4a12-86b7-74f5df36047b/aquota.user': Operation not permitted' in /usr/share/openmediavault/engined/module/mediabrowser.inc:98 Stack trace: #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleMediaBrowser->applyConfig() #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array) #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array) #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array) #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array) #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array) #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array) #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array) #8 /usr/sbin/omv-engined(501): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1) #9 {main}


    Any help would be great.


    Thanks.

  • Sergio:
    maybe you can have a look here:
    Disaster - all data lost
    Thx


    Edit:
    how about creating a subfolder in the $DATA-directory like:


    /media/1234-uuid-ofthe-hdd-here-567/shared-folder/mediabrowser-data


    where sharedfolder is the DATA-directory setup in the plugin. Then you can easily delete and/or move the mediabrowser-data-folder without loosing other data by mistake.

  • So telling that the cache folder it's your favorite media folder will obviously be self-defeating.


    We have to prevent users to select their media folders, so that they don't loose their data -> create a sub-directory is IMO a must!


    Edit:
    Just tried it in a VM:
    I chose /media/6db7602d-5e7a-4580-8cc9-15a3044fb6a2 (testfolder) as the DB-Volume, the DB-folder looks like this:
    /media/6db7602d-5e7a-4580-8cc9-15a3044fb6a2
    and mediabrowser creates all of its folders in the root of this drive:


    If I remove the plugin, it removes /media/6db7602d-5e7a-4580-8cc9-15a3044fb6a2 with ALL the shares!
    That is a NoGo!
    Create a subfolder in /media/6db7602d-5e7a-4580-8cc9-15a3044fb6a2 like "mediabrowser-db-data" or something like that and you can only delete/move this folder.


    I can only warn ppl to use version 1.02 of the plugin:
    It can delete ALL your Data if it is misconfigured!
    I know, you made it clear, but if someone make a wrong click -> BAM!
    rm -rf $DATAFOLDER (which is the main root of the drive with all the shares)

    • Offizieller Beitrag

    Changing the ownership of the files would not help. The postrm script runs as root and can delete whatever it wants. I did tell him that most of the plugins don't delete database files and it can be dangerous.


    To fix the plugin is easy. The upgrade for people who have the plugin already installed is hard. I will install the plugin and see exactly what files/dirs it installs. Then change the plugin code to move only those exact files/dirs.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Read my notes on other post. I saw the postrm. Why is the cache file copied and then removed? Why not just move it?


    The ownership should be changed to prevent other problems. I believe the UI gives ability to delete. If that is the case any user could delete files. You do not want this. Service should not run using "users" as group.


    With other plugins the package removes it. It is not in the postrm.

    • Offizieller Beitrag

    Moving files is dangerous. If you have a glitch in the middle, you could half the files in two locations. Copying is much better.


    The ownership doesn't fix the problem. The files are only deleted when the plugin is uninstalled. The plugin (unlike all the other plugins) deletes the database files on uninstallation in the postrm file. I discussed this with Sergio and told him I wouldn't remove them.


    If you switch the location, they will be moved but not gone. All of these actions happen as root (just like everything else in OMV), so permissions don't help.


    All this would be fixed by using a subfolder. There is nothing wrong with the rest of the plugin.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I am not talking about cache files now. I am talking about preventing people's media files being erased by another user in the hosuehold via the UI. I am saying the whole service should be run as mediabrowser:nogroup. It should only need the media folder to be chmod 775 to read them. But you don't want the service to be able to delete any media files. If you make it part of the users group things can be deleted via the UI.

    • Offizieller Beitrag

    I agree with that (and will fix) but that is not the major problem here. Uninstalling this plugin is very dangerous and people will lose everything on that drive!

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    He used the code from other plugins (minidlna, calibre, etc) and the mediabrowser user is added to the user group. I can run the daemon as mediabrowser:nogroup but I don't know if that keeps it from deleting files because the mediabrowser user is still part of the user group. If the mediabrowser user is not part of the user group, will that cause any issues??

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I don't believe it will cause any issues. It does not in plex. When media shared folders are created they just need to be chmod 775, which is the default.


    Where in the code was the mediabrowser user added to the users group??? That should be removed. I wonder what the default is for this program?


    It is in the postinst file that he added the mediabrowser user to the users group. Change it to nogroup.



    PS- if there were issues changing the user's group there would have been a problem when it was changed to the "users" group.

    • Offizieller Beitrag

    The user is created and added to the user group in the postinst file. Calibre does the same thing and the minidlna plugin adds the minidlna user to the user group. Code changed on github.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Minidlna does not have a UI where things can be deleted. My opinion is, it is better for people's data to not be deleted by a service, especially where there is a UI with no login required. Some of these programs have apps that would allow deletion too.


    You wake up one morning and your kid has deleted "Star Trek Into Darkness". :cursing:

    • Offizieller Beitrag

    I agree. Testing changes now.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Anyone care to try the update? It should be very safe now and working well on my VMs. You can remove but don't purge version 1.0.2.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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