Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
File permissions in cache
Avatar
samuel.penn #1
Member since Jan 2013 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: File permissions in cache
As part of a backup process, I run a regular rsync of several DokuWiki installations. All work fine, except for one, which gives permissions errors on cache files:

rsync: send_files failed to open "/var/www/site.name/htdocs/data/cache/0/083d96bbbbbc11b9c72ff0f363f2a921.xhtml": Permission denied (13)

Looking at the files in question, I see permissions like this:

-rw-r--r-- 1 www-data www-data     10 May  3 15:30 083d96bbbbbc11b9c72ff0f363f2a921.metadata
-rw-r----- 1 www-data www-data   2622 May  3 15:30 083d96bbbbbc11b9c72ff0f363f2a921.xhtml

I can fix them easily enough with a chmod, but the errors crop up again later. For some reason, some files are being written with the wrong (well, different) permissions. All the other installs write files with 644 permissions.

A couple of points:
  * I have half a dozen DokuWiki sites (each a separate DokuWiki install) on this machine, all running under a single Apache instance. Only one is seeing this problem.
  * This particular wiki has had no changes to content for over a year, yet the problem crops up again after fixing the permissions.

The machine is a Ubuntu 18.04 instance, running 2018-04-22b "Greebo"

Does anyone know what may be controlling the permissions, and causing them to be different on this one site?

Thanks,
Sam.
Avatar
Michaelsy #2
Member since Jun 2015 · 969 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
It is not necessary (and maybe even not recommendable) to include the cache in the backup. Basically, you can always delete the entire contents of the cache directory. It is only for acceleration of DokuWiki.

HTH - Michael Sy.

Add: If I made changes (such as restoring a backup) to a DokuWiki via rsync, I would even delete the cache completely for safety's sake. Whether this is absolutely necessary, I do not know.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited 2 times, last on 2019-05-05, 12:53 by Michaelsy.
Avatar
samuel.penn #3
Member since Jan 2013 · 6 posts
Group memberships: Members
Show profile · Link to this post
Okay, thanks, I may take a look at my rsync options.

That still doesn't answer the question of what is actually going on, and why this instance is behaving differently to the others though.
Avatar
andi (Administrator) #4
User title: splitbrain
Member since May 2006 · 3474 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
What are your dmode and fmode settings set to? What's the umask your PHP runs under?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
samuel.penn #5
Member since Jan 2013 · 6 posts
Group memberships: Members
Show profile · Link to this post
Umask of the Apache process was 0022, I can't see PHP specifically setting it anywhere.
I don't set either fmask or dmask on the file system mount.

I have tried setting umask to 000 in /etc/apache2/envvars, but that doesn't seem to have made any difference (other than changing the umask fo the process).
Avatar
samuel.penn #6
Member since Jan 2013 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Resolved
Okay, some more digging around and it's also content files which are having the same problem (the wiki with the problem is pretty much dormant, so no new content has been added for a while).

However... further digging and I've discovered that the fmode/dmode values that andi was referring to are most probably the ones in the dokuwiki config rather than filesystem level configs. These are different (640/750) on the problematic wiki, and I've updated them to be 644 and 755. This has fixed the problem.

Thanks for your help.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-23, 20:06:26 (UTC +02:00)