Checking server setup should pass.
Get error under "Security & setup warning"

Operating system: CentsOS 7.5
Web server: nginx 1.15.3
Database: mariadb 10.3.9
PHP version: 7.2.9
Nextcloud version: 14.0.0
Updated from an older Nextcloud/ownCloud or fresh install: yes
Where did you install Nextcloud from: docker image
Signing status:
The error is about the server setup checking.
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
Browser: Firefox 62.0
Operating system: ArchLinux
nothing here
Nextcloud log
{"reqId":"qruZgYucXWF7sk27q0O9","level":3,"time":"2018-09-06T12:57:27+02:00","remoteAddr":"xx.xx.xx.x","user":"admin_user","app":"index","method":"GET","url":"\/settings\/ajax\/checksetup","message":"Exception":"TypeError","Message":"Argument 1 passed to OC\\Settings\Controller\\CheckSetupController::getAppDirsWithDifferentOwnerForAppRoot() must be of the type array, boolean given, called in \/nextcloud\/settings\/Controller\/CheckSetupController.php on line 551","Code":0,"Trace":[{"file":"\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":551,"function":"getAppDirsWithDifferentOwnerForAppRoot","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[false,{"path":"\/apps2","url":"\/apps2","writable":true}]},{"file":"\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":624,"function":"getAppDirsWithDifferentOwner","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"check","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\CheckSetupController"},"check"]},{"file":"\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\CheckSetupController"},"check"]},{"file":"\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Settings\\Controller\\CheckSetupController","check",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.CheckSetup.check"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":{"_route":"settings.CheckSetup.check"}]},{"file":"\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"settings.CheckSetup.check"}]},{"file":"\/nextcloud\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/settings\/ajax\/checksetup"]},{"file":"\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/nextcloud\/settings\/Controller\/CheckSetupController.php","Line":568,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:62.0) Gecko\/20100101 Firefox\/62.0","version":"14.0.0.19"}
nothing
GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/3734 (No calendar export possible, internal server error), https://github.com/nextcloud/server/issues/6994 (Internal Server Error), https://github.com/nextcloud/server/issues/10140 (Internal server error), https://github.com/nextcloud/server/issues/9004 (Permissions error), and https://github.com/nextcloud/server/issues/3517 (Server Error; Unable to access through nginx).
I just found out that in file settings/Controller/CheckSetupController.php #L546 the variable $currentUser is false in my setup.
It could be related to this comment where posix_getpwuid() returns false if /etc/passwd is not readable (because of GrSec, SeLinux,...) for the php user.
And because of that the function call in #L551 fails. The function expects an array instead of an boolean.
Thank you for reporting this issue :+1:
When you replace $currentUser = posix_getpwuid(posix_getuid()); with $currentUser = posix_getuid(); and https://github.com/nextcloud/server/blob/a6bb19fa11fb132f91eeb692057a0bd5b7e94948/settings/Controller/CheckSetupController.php#L576 $appDirUser = fileowner($absAppPath); does it work then?
If I replace additionaly the following line
https://github.com/nextcloud/server/blob/a6bb19fa11fb132f91eeb692057a0bd5b7e94948/settings/Controller/CheckSetupController.php#L568
to
private function getAppDirsWithDifferentOwnerForAppRoot(int $currentUser, array $appRoot): array {
it works again. Thanks!
i have the same error on 14.0.4 and 15.0.0. i am running php-fpm without posix.