Page MenuHomePhabricator

Unable to upload new version of images in commons beta lab
Closed, ResolvedPublic

Description

Output of the error in commons beta lab

Error:

Could not read or write file "mwstore://local-backend/local-public/3/3d/VisualEditor_save_dialog-he.png" due to insufficient permissions or missing directories/containers.

Could not store file "/tmp/UgKpr4" at "mwstore://local-backend/local-public/3/3d/VisualEditor_save_dialog-he.png".

I had got similar error while uploading images through API:

{

"servedby": "deployment-mediawiki02",     
"error":
     {         
         "0": [             "backend-fail-usable",             "mwstore://local-backend/local-public/6/68/VisualEditor_Insert_Menu-he.png"         ],         
         "1": [             "backend-fail-store",             "/tmp/owzHOG",             "mwstore://local-backend/local-public/6/68/VisualEditor_Insert_Menu-he.png"         ],         
         "code": "internal-error",         
         "info": "An internal error occurred"     
     }

}

Scenario:

  • I go to one of the image which I had already uploaded in commons[0].
  • I click on upload new version of this file at the bottom of the page.
  • I add a new image[1] by browsing my file system and I click Upload file.
  • Then I get the error reported above or the image in attachment.

[0]: http://commons.wikimedia.beta.wmflabs.org/wiki/File:VisualEditor_save_dialog-en.png

[1]: http://commons.wikimedia.beta.wmflabs.org/w/index.php?title=Special:Upload&wpDestFile=VisualEditor_save_dialog-en.png&wpForReUpload=1


Version: unspecified
Severity: normal

Attached:

Commons_beta_labs_upload_error.png (1×2 px, 1 MB)

Details

Reference
bz68760

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:29 AM
bzimport set Reference to bz68760.
bzimport added a subscriber: Unknown Object (MLST).

Showing my ignorance: Do you have the right permissions? I apparently don't as I see "You cannot overwrite this file." on that and other images on the beta cluster commons.

Let me know your user names and I can upgrade your privileges on beta labs.

(In reply to Chris McMahon from comment #2)

Let me know your user names and I can upgrade your privileges on beta labs.

"Greg (WMF)"

(In reply to Chris McMahon from comment #2)

Let me know your user names and I can upgrade your privileges on beta labs.

LanguageScreenshotBot

Looks like the images which were uploaded before(i.e. before we got the some problems with beta labs recently) have this problem. I tried updating the image which was uploaded yesterday and it works fine.

cc'ing ori/bryan in case this was an effect of hhvm permission weirdness.

Beta uses the NFS shared directory /data/project/upload7 to store images.

I just did a permissions check on this directory for sub-directories that are not world writable and found a bunch. This is a likely cause of at least some of the failures.

To check:

$ cd /data/project/upload7
$ find . -type d ! -perm -o=w
  ... lots of dirs output here ...

To fix:

$ cd /data/project/upload7
$ sudo find . -type d ! -perm -o=w -exec chmod 0777 {} +

A hack fix would be to cron this fix somewhere in beta. A better fix would be to kill NFS and use swift for image storage.

greg claimed this task.

Resolving per:

Beta uses the NFS shared directory /data/project/upload7 to store images.

I just did a permissions check on this directory for sub-directories that are not world writable and found a bunch. This is a likely cause of at least some of the failures.

Swift is: T64835: Setup a Swift cluster on beta-cluster to match production