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?

  • Anyone? I know there’s a lot of text but it would be really helpful if someone could just answer if I need to create the www-data user for the preview generator to work or if the way @TechnoDadLife setups the docker container demand different commands for the plug-in to generate previews than the official instructions.


    Thanks


  • 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

    2 Mal editiert, zuletzt von hemlig () aus folgendem Grund: New error messages in Nextcloud

  • chowned all the files and folders in /config/www/netcloud to abc:abc and got it generating previews now. Hopefully it will work now, I just need to change the php limit value. Thanks for the help!

Jetzt mitmachen!

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