Page MenuHomePhabricator

Uploading files not working due to MediaWiki not being able to open a lock file
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

Could not open lock file for "mwstore://local-backend/local-public/c/c8/Arc_2V_16kA_disjoncteur_ultra_rapide_courant_continu_(dessus).webp". Make sure your upload directory is configured correctly and your web server has permission to write to that directory. See https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory for more information.

What should have happened instead?:

File should be uploaded without that error.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Patch Demo with https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1270030

Other information (browser name/version, screenshots, etc.):
/

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
_helpers.tpl: remove images dir chown to nobodyrepos/test-platform/catalyst/ci-charts!132jhuneidijhuneidi-main-patch-06491main
common/base/www.conf: change user to www-datarepos/releng/dev-images!105jhuneidiT422996main
Customize query in GitLab

Event Timeline

Ah, thanks for noticing that my task was a duplicate, @Tacsipacsi :)
FWIW, I feel like uploading files may have used to work on Catalyst-backend wikis (but I don't know how certain I am on that - I feel like it definitely used to work on some Patch Demo wikis, though).

[moving this to the 'triage' column in case that's where PatchDemo/Catalyst folks find newly-filed tasks in this project]

thcipriani subscribed.

Eeek. Thanks for flagging. I think this broke at the end of March due to changing ownership of the code directory.

The php-fpm container (the same one used for mediawiki-docker dev) has an implicit runtime user of nobody. Now www-data is the owner of /var/www/html.

thcipriani set the point value for this task to 1.
thcipriani moved this task from Backlog to Ready on the Catalyst (Luka Ijo Pimeja Jan) board.
== Step 2: publishing ==
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php83-fpm:1.0.0-s3
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php84-fpm:1.0.0-s2
Successfully published image docker-registry.discovery.wmnet/dev/fundraising-tools-bookworm:1.0.1
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php83:1.0.0-s3
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php-sury:1.0.1-s2
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php83-jobrunner:1.0.0-s3
Successfully published image docker-registry.discovery.wmnet/dev/bookworm:1.0.0-s2
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php84-jobrunner:1.0.0-s2
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-php84:1.0.0-s2
Successfully published image docker-registry.discovery.wmnet/dev/bookworm-apache2:1.0.1-s2
== Build done! ==

Uploads should work with new environments now!

Confirming that uploading a file on a new patch demo wiki works for me now, thanks :)

Change #1326350 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Docker: Upgrade base images to have composer 2.10.2 and XHProf/Excimer, and www-data user

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