Run OCC command as apache http user in Amazon AMI Linux


Nextcloud version (eg, 10.0.2): 11.0.1
Operating system and version (eg, Ubuntu 16.04): Amazon AMI Linux
Apache or nginx version (eg, Apache 2.4.25): 2.4
PHP version (eg, 5.6): 5.6
Is this the first time you’ve seen this error?: No

Can you reliably replicate it? (If so, please outline steps): Yes

Would it be possible to add the following to this section of the documentation? https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html#http-user-label

In order to run the nextcloud occ command when using an Amazon AMI linux server, we must run it as the apache http user. To do this, do it this way:

Terminal to your server
sudo su
cd /var/www/html/nextcloud (Change to your Nextcloud web directory)
sudo -u apache php occ -V