Page MenuHomePhabricator

wrong l10nupdate cache file permissions
Closed, ResolvedPublic

Description

l10nupdate emit an error message when run as hashar:wikidev

Copying LC files back to /home
cp: cannot create regular file `/home/wikipedia/common/php-1.19/cache/l10n/l10n_cache-ab.cdb': Permission denied
<more similar messages follow>

Does not make any sense since files are owned by awjrichards:wikidev and have group write.


Version: unspecified
Severity: normal

Details

Reference
bz36120

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:25 AM
bzimport added a project: Deployments.
bzimport set Reference to bz36120.
bzimport added a subscriber: Unknown Object (MLST).

Even worse with 1.20wmf1 :

Copying LU files back to /home
cp: cannot create regular file `/home/wikipedia/common/php-1.20wmf1/cache/l10n/l10nupdate-ab.cache': Permission denied

AND

Copying LC files back to /home
cp: cannot create regular file `/home/wikipedia/common/php-1.20wmf1/cache/l10n/l10n_cache-ab.cdb': Permission denied

l10nupdate should be running as the l10nupdate user, and that user should own the cache/l10n directory. Which it does for 1.19, so that should be working. I fixed the perms on the 1.20 dir just now.

Most of the files inside the directory, however, are owned by awjrichards or catrope, probably because these users have run LC cache rebuilds (which are triggered from scap). So it may fail to overwrite these files, which is stupid because it can overwrite them by deleting and recreating them. Adding the -f flag to the cp invocation in the script should fix that, I'll do that now.

(In reply to comment #2)

So it may fail to overwrite these files, which is stupid
because it can overwrite them by deleting and recreating them. Adding the -f
flag to the cp invocation in the script should fix that, I'll do that now.

https://gerrit.wikimedia.org/r/5443

closing pending review of gerrit #5443.