Open Sanookmakmak opened 5 years ago
same issue here.
/usr/bin/libreoffice: 52: cd: can't cd to /root
(process:6668): dconf-CRITICAL **: unable to create directory '/var/www/web1/.cache/dconf': Permission denied. dconf will not work properly.
Preview generator does not create preview for PDF, Office documents and video files.
The .cache
folder is used for generating previews only for office documents (.odt, .ods, .odp) IMHO.
The default location of it is the home directory of the user, in case of an ISPConfig server it is /var/www/clients/client1/web1
for the first site of client 1.
The home directory has setup the immutable bit, therefore the .cache
folder can be created only by
chattr -i /var/www/client/client1/web1
mkdir /var/www/client/client1/web1/.cache
chown web1:client1 /var/www/client/client1/web1/.cache
chattr +i /var/www/client/client1/web1
After adding the .cache
folder manually as root, preview generation of office documents are working.
But not every user has root access to disable the immutable bit, so in my opinion this is a bug in the preview generator app and should be fixed @rullzer.
Hi I'm having a similar problem, but the path is different and I'm having a tough time figuring out the permissions.
The path for me is /root/.cache
I've tried changing the owner:group to www-data:www-data (which is the permission needed for most other nextcloud files and folders in my install), but no luck.
Any suggestions? Thanks!
I have this error also - but I am not using the /var/www/... directory structure at all. So I'm not sure where the script is getting this from. Shouldn't it read from the nextcloud config to place these directorys in the data directory of users?
The path for me is /root/.cache
then your preview-generator cronjob is running as root
when you say that "The default location of it is the home directory of the user" - do you mean like with linux user accounts?
I have nextcloud installed with users within that, but no other accounts locally on the machine.
I want to get the preview of office documents to work, but when I run:
sudo -u www-data php /usr/share/nginx/nextcloud/occ preview:generate-all -vvv
I get:
(process:13779): dconf-CRITICAL **: 02:16:49.573: unable to create directory '/var/www/.cache/dconf': Permission denied. dconf will not work properly.
My nextcloud data is located in /media/datastore/nextcloud-data
so I'm assuming the previews would be placed somewhere in there? (along with the image previews that generate successfully)
I figured it out - since the sudo -u www-data php /usr/share/nginx/nextcloud/occ preview:generate-all -vvv
command is being run under the www-data
user, that user's home directory was set to /var/www/
hence the error about being unable to create the .cache/dconf
directory.
I stopped nginx and php7.3-fpm and ran the command usermod -d /usr/share/nginx/ www-data
which changed www-data
's home directory. Created the .conf
directory and now preview-generate-all -vvv
doesn't show any errors when attempting to create previews for office docs.
Sorry to dig out this old issue, but I'm also facing this problem at one installation.
Although I run:
sudo -u www-data php -f /var/www/nextcloud/occ preview:generate-all -vvv
I'm getting the error message "unable to create directory '/root/.cache/dconf' "
The home path of www-data is "/var/www/", I'm running the occ command as user www-data ... why in the world does it like to create the cache in the /root/ - Folder?`And how do I fix this?
Sorry to dig out this old issue, but I'm also facing this problem at one installation.
Although I run:
sudo -u www-data php -f /var/www/nextcloud/occ preview:generate-all -vvv
I'm getting the error message "unable to create directory '/root/.cache/dconf' "
The home path of www-data is "/var/www/", I'm running the occ command as user www-data ... why in the world does it like to create the cache in the /root/ - Folder?`And how do I fix this?
I have the same issue here. Were you able to solve this?
https://gitlab.gnome.org/GNOME/dconf/-/issues/18
In environments where this is a problem, maybe if you disable dconf for llibreoffice on your server would work? e.g.
Nextcloud 15.05 on Ubuntu 18.04 with ISPConfig:
While executing the Preview Generator cronjob:
Does not generate previews for PDF files!