NextCloud's Preview generator - can't get it to work

    • OMV 4.x
    • Resolved
    • NextCloud's Preview generator - can't get it to work

      Hi
      New to the forum, and really rather new to hosting my own Linux server but I’m getting the hang of it step by step. I now have a openmediavault running on top of a Armbian/Debian Stretch distro on my mini server (arm). Nextcloud is running in docker as per the guide that @TechnoDadLife has on youtube Nextcloud in OMV docker.

      Thank you for that by the way!

      Everything with Nextcloud is running smooth but now when I want Nextcloud to act as my familys photo storage/management I really need the preview generator to make it work. I somehow can’t get it to start with the different commands I found in all the guides. The app itself installs through the Nextcloud web interface, but when I want to run the commands I get into trouble.
      So if someone could give me a quick step by step guide to run preview generator in my setting with OMV running Nextcloud in a docker container I’d be really thankful. I believe I could use the scheduled jobs tab (cron) to run the initial preview generating and then later the scheduled jobs but I only get long and, for me, incomprehensible error messages. But that could be because of my lack of understanding where the preview generator wants to run - in or outside of the Nextcloud container.

      I know that Nextcloud as default uses www-data but I’ve never had any www-data user configured in my system and thought I didn’t need to create one, but I could have misunderstood that. My users are added in www-data group at least.
      I've tried with -u www-data php /var/www/nextcloud/occ preview:generate-all in the container but that just gives me an error message "No passwd entry for user ‘www-data’" if trying to su the command and "sudo: unknown user: www-data, sudo: unable to initialize policy plugin" if trying to sudo the command.

      Is there need to add a www-data user and group in the OMV web interface for this to work or is there something else I should do?
    • hemlig wrote:

      Hi
      New to the forum, and really rather new to hosting my own Linux server but I’m getting the hang of it step by step. I now have a openmediavault running on top of a Armbian/Debian Stretch distro on my mini server (arm). Nextcloud is running in docker as per the guide that @TechnoDadLife has on youtube Nextcloud in OMV docker.

      Thank you for that by the way!

      Everything with Nextcloud is running smooth but now when I want Nextcloud to act as my familys photo storage/management I really need the preview generator to make it work. I somehow can’t get it to start with the different commands I found in all the guides. The app itself installs through the Nextcloud web interface, but when I want to run the commands I get into trouble.
      So if someone could give me a quick step by step guide to run preview generator in my setting with OMV running Nextcloud in a docker container I’d be really thankful. I believe I could use the scheduled jobs tab (cron) to run the initial preview generating and then later the scheduled jobs but I only get long and, for me, incomprehensible error messages. But that could be because of my lack of understanding where the preview generator wants to run - in or outside of the Nextcloud container.

      I know that Nextcloud as default uses www-data but I’ve never had any www-data user configured in my system and thought I didn’t need to create one, but I could have misunderstood that. My users are added in www-data group at least.
      I've tried with -u www-data php /var/www/nextcloud/occ preview:generate-all in the container but that just gives me an error message "No passwd entry for user ‘www-data’" if trying to su the command and "sudo: unknown user: www-data, sudo: unable to initialize policy plugin" if trying to sudo the command.

      Is there need to add a www-data user and group in the OMV web interface for this to work or is there something else I should do?

      To start the generatro directly from the OMV SSH use:
      docker exec nextcloud /bin/sh -c 'sudo -u abc php7 ./config/www/nextcloud/occ preview:generate-all'

      if you are inside the nextcloud docker you can just use:
      sudo -u abc php7 ./config/www/nextcloud/occ preview:generate-all

      hope this helps

      PS: I have over 83'650 photos and it works great!

      Andy
    • Thank you very much Andy @GekoCH. I'm sure this will work but when I try it I get an error message that config/config.php is owned by the user xfs and that I will have to run the command with that user instead of user abc. I know I could try to replace the user like suggested or maybe chown the config.php file but will any of those options screw up my Nextcloud installation in the container?

      Edit: Suddenly I get these error messages in Nextcloud. Obviously some of my previous attempts of running the preview generator has produced some unwanted results. I guess this is connected to the xfs user problem above.


      • Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:
        • /config/www/nextcloud/apps/accessibility
        • /config/www/nextcloud/apps/activity
        • /config/www/nextcloud/apps/admin_audit
        • /config/www/nextcloud/apps/cloud_federation_api
        • /config/www/nextcloud/apps/comments
        • /config/www/nextcloud/apps/dav
        • /config/www/nextcloud/apps/encryption
        • /config/www/nextcloud/apps/federatedfilesharing
        • /config/www/nextcloud/apps/federation
        • /config/www/nextcloud/apps/files
        • /config/www/nextcloud/apps/files_external
        • /config/www/nextcloud/apps/files_pdfviewer
        • /config/www/nextcloud/apps/files_sharing
        • /config/www/nextcloud/apps/files_texteditor
        • /config/www/nextcloud/apps/files_trashbin
        • /config/www/nextcloud/apps/files_versions
        • /config/www/nextcloud/apps/files_videoplayer
        • /config/www/nextcloud/apps/firstrunwizard
        • /config/www/nextcloud/apps/gallery
        • /config/www/nextcloud/apps/logreader
        • /config/www/nextcloud/apps/lookup_server_connector
        • /config/www/nextcloud/apps/nextcloud_announcements
        • /config/www/nextcloud/apps/notifications
        • /config/www/nextcloud/apps/oauth2
        • /config/www/nextcloud/apps/password_policy
        • /config/www/nextcloud/apps/provisioning_api
        • /config/www/nextcloud/apps/serverinfo
        • /config/www/nextcloud/apps/sharebymail
        • /config/www/nextcloud/apps/support
        • /config/www/nextcloud/apps/survey_client
        • /config/www/nextcloud/apps/systemtags
        • /config/www/nextcloud/apps/theming
        • /config/www/nextcloud/apps/twofactor_backupcodes
        • /config/www/nextcloud/apps/updatenotification
        • /config/www/nextcloud/apps/user_external
        • /config/www/nextcloud/apps/user_ldap
        • /config/www/nextcloud/apps/workflowengine

      The post was edited 2 times, last by hemlig: New error messages in Nextcloud ().

    • Users Online 1

      1 Guest