Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview Generator 2.1.0: unable to create directory '~/.cache/dconf': Operation not permitted. dconf will not work properly #154

Open
Sanookmakmak opened this issue Mar 13, 2019 · 10 comments

Comments

@Sanookmakmak
Copy link

Nextcloud 15.05 on Ubuntu 18.04 with ISPConfig:

While executing the Preview Generator cronjob:

(process:8261): dconf-CRITICAL **: 06:50:06.831: unable to create directory '/var/www/clients/client1/web7/.cache/dconf': Operation not permitted.  dconf will not work properly.
func=xmlSecCheckVersionExt:file=xmlsec.c:line=188:obj=unknown:subj=unknown:error=19:invalid version:mode=abi compatible;expected minor version=2;real minor version=2;expected subminor version=25;real subminor version=26

Does not generate previews for PDF files!

@kroerig
Copy link

kroerig commented Mar 27, 2019

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.

@Sanookmakmak
Copy link
Author

Preview generator does not create preview for PDF, Office documents and video files.

:-(

@Sanookmakmak
Copy link
Author

Sanookmakmak commented May 19, 2019

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.

@acloudadmin
Copy link

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!

@chagwood
Copy link

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?

@Sanookmakmak
Copy link
Author

The path for me is /root/.cache

then your preview-generator cronjob is running as root

@chagwood
Copy link

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)

@chagwood
Copy link

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.

@jacotec
Copy link

jacotec commented Jan 5, 2022

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?

@Klaupe
Copy link

Klaupe commented Mar 10, 2022

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?

Bluesmoothie added a commit to Bluesmoothie/nextcloud_ynh that referenced this issue Aug 2, 2023
Update install script to change home directory of nextcloud user and avoid this error : nextcloud/previewgenerator#154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants