Troy
October 16, 2026, 2:50pm
1
How to reproduce
Create a Laravel app with Laravel Passport on an ApisCP site, Fortification on.
As the account user, run:php artisan passport:keys
This creates storage/oauth-private.key (mode 600) and storage/oauth-public.key.
Add public/.webapp.yml:---
base: laravel
fortification:
max:
- storage/oauth-private.key
- storage/oauth-public.key
Sign it and fortify Max:
Both key files are now mode 670, with user:apache:rwx in getfacl.
Load any page that uses Passport, such as /oauth/authorize.
What’s happening
500 error:
Key path "file:///.../storage/oauth-private.key" does not exist or is not readable
PHP still can’t read the private key after fortifying.
What’s expected
After adding the key files to the manifest and fortifying, PHP can read them, with Fortification still on.
Notes
Passport’s own permission check is turned off in the app (Passport::$validateKeyPermissions = false), so the 670 mode itself isn’t the problem.
The private key’s ACL still gives the group nothing, while the public key’s gives it read.
Setting both keys to 660 by hand (chmod 660 storage/oauth-*.key) makes them readable, so read access through the group works.
Fortifying sets them back to 670 with user:apache:rwx, and PHP can’t read them again.
Passport’s only documented alternative is putting both keys in .env, which adds several KB to that file. A file-based fix would be preferred.
What is reported from CLI with stat storage storage/oauth-private.key storage/oauth-public.key as well as the PHP-FPM pool owner under Web > PHP Pools?
Troy
October 16, 2026, 7:37pm
3
[webuser1@p1 html-laravel]$ stat storage storage/oauth-private.key storage/oauth-public.key
File: storage
Size: 95 Blocks: 0 IO Block: 4096 directory
Device: 0,179 Inode: 142226399 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 9967/webuser1) Gid: (10001/webuser1)
Access: 2026-10-16 09:48:18.141915998 -0500
Modify: 2026-10-16 07:59:27.746957679 -0500
Change: 2026-10-16 09:48:18.140672003 -0500
Birth: 2026-10-09 09:52:24.590422933 -0500
File: storage/oauth-private.key
Size: 3322 Blocks: 8 IO Block: 4096 regular file
Device: 0,179 Inode: 146328358 Links: 1
Access: (0670/-rw-rwx---) Uid: ( 9967/webuser1) Gid: (10001/webuser1)
Access: 2026-10-16 12:59:54.772588593 -0500
Modify: 2026-10-16 07:59:27.747339861 -0500
Change: 2026-10-16 14:33:50.118504544 -0500
Birth: 2026-10-16 07:59:27.746957679 -0500
File: storage/oauth-public.key
Size: 812 Blocks: 8 IO Block: 4096 regular file
Device: 0,179 Inode: 141155859 Links: 1
Access: (0670/-rw-rwx---) Uid: ( 9967/webuser1) Gid: (10001/webuser1)
Access: 2026-10-16 11:41:26.787897599 -0500
Modify: 2026-10-16 07:59:27.746957679 -0500
Change: 2026-10-16 14:33:50.118504544 -0500
Birth: 2026-10-16 07:59:27.745624898 -0500
PHP Pool Owner is: apache
Web Apps → Options → User Ownership: webuser1
overlayfs cache needs to be dumped after ACLs are applied.
Run systemctl reload fsmount to fix. I’ll get that patched Monday.
Resolved in 39.1. This release will restrict further rewinds if a .2, .3, etc get released pending .40.