Page MenuHomePhabricator

Default dbpath for install.php (dbtype sqlite) no longer works. (Writes to root of disk)
Closed, ResolvedPublic

Description

php maintenance/install.php --dbtype sqlite --pass WikiPassword TmpWiki WikiAdmin
error
Cannot create the data directory /data,  because the parent directory / is not writable by the webserver.

The default in this maintenance script is documented as $IP/data. But, it seems this is failing and ends up being concatenated as '' + '/data', resulting in the fatal error about / not being writable by this user (as expected).

Event Timeline

Krinkle created this task.Mar 7 2019, 6:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 7 2019, 6:03 PM
Krinkle updated the task description. (Show Details)

Workaround is --dbtype sqlite --dbpath "$PWD/data". Although that fails at first as well, because the directory needs to be created. Seems like something that should work by itself, or default to a different location that is writable.

RazeSoldier triaged this task as Medium priority.

Change 513732 had a related patch set uploaded (by 星耀晨曦; owner: 星耀晨曦):
[mediawiki/core@master] Fix installation failure due to unexpected dbpath under CLI installation

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

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

This missed the boat for the MW 1.33 release. Provisionally re-tagging to 1.34's release instead.

@Anomie Could you take a look at the patch for this when you are back?

Change 523975 had a related patch set uploaded (by 星耀晨曦; owner: 星耀晨曦):
[mediawiki/core@master] Fix installation failure due to unexpected dbpath under CLI installation

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

Change 513732 abandoned by Anomie:
Fix installation failure due to unexpected dbpath under CLI installation

Reason:
Although since you've submitted several more patch sets at the other change, it's probably better at this point to just abandon this one and continue on the other. I'll go ahead and do that for you.

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

Hey there, should this be moved to 1.35? The cut is a couple of weeks away. If it needs to go out in 1.34, is there anything I can do to help get it out of the door?

Krinkle removed a subscriber: Krinkle.Sep 5 2019, 10:38 PM

Hey there, should this be moved to 1.35? The cut is a couple of weeks away. If it needs to go out in 1.34, is there anything I can do to help get it out of the door?

This should not be a bug that must be fixed in time, but the patch is now +1 and needs someone to push it.

Change 523975 merged by jenkins-bot:
[mediawiki/core@master] Fix installation failure due to unexpected dbpath under CLI installation

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

Jdforrester-WMF closed this task as Resolved.Sep 6 2019, 5:39 PM
Aklapper removed a subscriber: Anomie.Fri, Oct 16, 5:41 PM