You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when trying to update: Call to undefined function posix_getuid() #2165
I tried to update Nextcloudpi via the command line.
At a certain point this is reported:
Enabling conf php8.5-fpm.
To activate the new configuration, you need to run:
systemctl reload apache2
Installing template 'systemd/php-fpm.service.d.ncp.conf.sh' to '/etc/systemd/system/php8.5-fpm.service.d/ncp.conf'...
Starting apache and php-fpm...
Warning: The unit file, source configuration file or drop-ins of php8.5-fpm.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Fatal error: Uncaught Error: Call to undefined function posix_getuid() in /var/www/nextcloud/occ:15
Stack trace:
#0 /var/www/nextcloud/occ(32): dropPrivileges()
#1 {main}
thrown in /var/www/nextcloud/occ on line 15
Something went wrong while upgrading PHP. Rolling back to version 8.3...
I tried the update to Nextcloud after an update of NextcloudPi to v1.59.0 which also gave some warnings. See: #2164
So, in my case, don't ask me why, I had the folder /etc/php/8.5 with permissions 750, likely before first installing PHP 8.5.
The fix I applied is removing completely the folder 8.5 inside the /etc/php folder and run the update script again.
Now I am happily on PHP 8.5.
If you want to test it before upgrading the Nextcloud instance, just run the /usr/local/bin/ncp-update-nc.d/upgrade-php-trixie-8.5.sh alone as root
My installation was also affected by this, and after running rm -f -d -r /etc/php/8.5, the update completed without any issues.
Thanks @guandalf for the solution!
I'm not sure that this can be closed. We found a way to fix the problem, when it occurs, but I'm not sure if the root cause has been resolved. I leave it up to @theCalcaholic to decide if this should be closed, or if the root cause should be found and solved (if still possible).
Activity
janvlug commentedon Nov 17, 2026
Here is the full log:
log.txt
guandalf commentedon Nov 19, 2026
This happens to me as well. If it can help, I am running on an Odroid HC4.
janvlug commentedon Nov 19, 2026
I think that the
posixmodule is somehow not loaded by PHP8.5. But I do not know why not.guandalf commentedon Nov 19, 2026
guandalf commentedon Nov 20, 2026
So, in my case, don't ask me why, I had the folder
/etc/php/8.5with permissions 750, likely before first installing PHP 8.5.The fix I applied is removing completely the folder 8.5 inside the /etc/php folder and run the update script again.
Now I am happily on PHP 8.5.
If you want to test it before upgrading the Nextcloud instance, just run the
/usr/local/bin/ncp-update-nc.d/upgrade-php-trixie-8.5.shalone as rootjanvlug commentedon Nov 20, 2026
I confirm I have that directory as well:
I will remove it and see if the update goes through...
janvlug commentedon Nov 20, 2026
I confirmed that removing the
/etc/php/8.5directory before runningncp-update-nc 33.0.11also fixed this issue for me.I think that this issue was caused by the issue that I reported here: https://github.com/nextcloud/nextcloudpi/issues/2164
Pyromane commentedon Nov 21, 2026
My installation was also affected by this, and after running
rm -f -d -r /etc/php/8.5, the update completed without any issues.Thanks @guandalf for the solution!
guandalf commentedon Nov 22, 2026
I think this can be closed @janvlug (I do not have permission).
🙏
janvlug commentedon Nov 22, 2026
I'm not sure that this can be closed. We found a way to fix the problem, when it occurs, but I'm not sure if the root cause has been resolved. I leave it up to @theCalcaholic to decide if this should be closed, or if the root cause should be found and solved (if still possible).
sbe-nsp commentedon Nov 23, 2026
tried the update today and ran in the same error