Cannot create process: proc_open: failed to open stream: Permission denied

1

I've seen this question posted around with no solution. And I've seen other posts that are related (one two) but don't help.

Permissions are set, executable, ownership is set, no SELinux, PHP can execute shell commands, PHP not in safe_mode, php-pcntl is installed.

I'm using Arch Linux, PHP 7.1, MediaWiki 1.28, php-fpm, nginx 1.10.3, and scribunto downloaded from MW for 1.28.

I'm trying to use Scribunto for Template:Navbox. The error is when I go to the template page, the luastandalone in scribunto raises the error trying to start a logger.

The error I'm getting:

Lua error: Cannot create process: proc_open(/usr/share/webapps/mediawiki/extensions/Scribunto/errorFile): failed to open stream: Permission denied

The LocalSettings.php lines:

require_once "$IP/extensions/Scribunto/Scribunto.php";
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoEngineConf['luastandalone']['errorFile'] = "$IP/extensions/Scribunto/errorFile";

And the permissions:

$ ls -l extensions/Scribunto/

total 96

-rw-r--r-- 1 root root 19917 Nov 18 19:15 COPYING

-rw-r--r-- 1 root root   609 Nov 18 19:15 Gruntfile.js

-rw-r--r-- 1 root root  2793 Nov 18 19:15 Scribunto.magic.php

-rw-r--r-- 1 root root  8111 Nov 18 19:15 Scribunto.namespaces.php

-rw-r--r-- 1 root root  9437 Nov 18 19:15 Scribunto.php

drwxr-xr-x 2 root root  4096 Nov 18 19:15 common

-rw-r--r-- 1 root root   702 Nov 18 19:15 composer.json

-rw-r--r-- 1 root root  3945 Nov 18 19:15 composer.lock

drwxr-xr-x 5 root root  4096 Jan  9  2016 engines

-rwxrwxrwx 1 root root     0 Feb 26 23:44 errorFile

-rw-r--r-- 1 root root   278 Nov 18 19:15 gitinfo.json

drwxr-xr-x 2 root root  4096 Nov 18 19:15 i18n

drwxr-xr-x 2 root root  4096 Nov 18 19:15 modules

-rw-r--r-- 1 root root   276 Nov 18 19:15 package.json

-rw-r--r-- 1 root root   505 Nov 18 19:15 phpcs.xml

drwxr-xr-x 3 root root  4096 Jan  9  2016 tests

drwxr-xr-x 3 root root  4096 Nov 18 19:15 vendor

-rw-r--r-- 1 root root    48 Nov 18 19:15 version

Do you know what's wrong?

user193661

Posted 2017-02-28T00:07:40.803

Reputation: 499

1The relevant permission is that of the Scribunto directory. – Tgr – 2017-02-28T09:36:06.077

@Tgr That solved the problem. I don't know why though. – user193661 – 2017-02-28T17:17:24.277

I take it the /usr/share/webapps/mediawiki/extensions/Scribunto directory wasn't writable to the PHP user so it could not create /usr/share/webapps/mediawiki/extensions/Scribunto/errorFile, which is what the error is complaining about. – Tgr – 2017-02-28T22:53:47.613

No answers