openmediavault-emby plugin (formerly mediabrowser)

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

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

      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.
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 3 times, last by Solo0815 ().

    • Sergio wrote:

      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:

      Source Code

      1. -rw------- 1 root root 6144 Nov 15 11:09 aquota.group
      2. -rw------- 1 root root 7168 Nov 15 11:09 aquota.user
      3. drwxrwxrwx 4 mediabrowser users 4096 Nov 15 12:42 cache
      4. drwxrwxrwx 3 mediabrowser users 4096 Nov 15 12:42 config
      5. drwxrwxrwx 7 mediabrowser users 4096 Nov 15 12:43 data
      6. drwxrwxrwx 3 mediabrowser users 4096 Nov 15 12:42 ffmpeg
      7. drwxrwxrwx 7 mediabrowser users 4096 Nov 15 12:42 ImagesByName
      8. drwxrwxrwx 2 mediabrowser users 4096 Nov 15 12:42 localization
      9. drwxrwxrwx 2 mediabrowser users 4096 Nov 15 12:42 logs
      10. drwxrwxrwx 2 mediabrowser users 16384 Feb 14 2014 lost+found
      11. drwxrwxrwx 3 mediabrowser users 4096 Nov 15 12:42 root
      12. drwxrwsrwx 2 mediabrowser users 4096 Nov 15 11:35 SharedFolder1
      13. drwxrwsrwx 2 root users 4096 Jul 4 09:51 SharedFolder2
      14. drwxrwsrwx 2 root users 4096 May 28 19:57 test444_SH
      15. drwxrwsrwx 2 mediabrowser users 4096 May 27 17:19 testforsmb
      Display All

      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)
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 1 time, last by Solo0815 ().

    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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.

      The post was edited 2 times, last by tekkb ().

    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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.
    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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.

      The post was edited 2 times, last by tekkb ().

    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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:

      The post was edited 1 time, last by tekkb ().

    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!