How to find the user name used by OC?

The webserver user needs to have access to the files. For Apache2 it’s the www-data user. You can make a ls -la and check if the user www-data has access to your files.