nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

gencache_init: Failed to create directory: /var/www/.cache/samba - Permission denied #264

Closed SpamReceiver closed 2 years ago

SpamReceiver commented 2 years ago

I have the folowing cron job for the user www-data:
0 2 * * * /usr/bin/php /mnt/data/var/www/nextcloud/occ preview:pre-generate -vvv > /mnt/data/var/log/preview-generate.log 2>&1

When I check the log, I find many of the following error messages:
gencache_init: Failed to create directory: /var/www/.cache/samba - Permission denied

User www-data has no access to /var/www. My web root folder is /mnt/data/var/www.

Happens with Nextcloud 22 + Preview Generator 3.x (now on 3.30, but happened also earlier).

st3iny commented 2 years ago

This is a very old and known issue of smbclient. It can be fixed by applying the following workaround: Create the folder /var/www/.cache/samba manually and grant your web server user (e.g. www-data) access to it.

SpamReceiver commented 2 years ago

What will be the impact of not fixing the issue? Will no previews be generated?