Most known linux distro use www-data as http user ; so your file showld have 775 permissions , if you have a folder test/ and a file /test/file.txt the follow commands showld work ; chown -R www-data:www-data /test ; chmod -R 775 /test ;
Check your server not in chroot and how user and group your server hold; in /etc/apache2/apache2.conf ;