I successfully installed nginx, HHVM (running with FastCGI) etc. on an Ubuntu 15.10 installation, and HHVM is, in itself, running fine. My /var/www directory is owned by my user and group (e.g. sam:sam), so I can access it via SSH and SFTP and change files accordingly. When now running a CMS like WordPress, it obviously runs as the web server (www-data), and thus cannot change/add/delete files from its backend (e.g. upload files, update WordPress/plugins) as would be required unless I change user and group ownership to www-data.
Is there a way to solve this to be able to change files via PHP and SSH without letting the web server run with a user that has obviously sudo rights? I believe 'normal' PHP running as FastCGI is able to circumvent the problem.
If I'm understanding the situation correctly you should change the ownership of the files to the
www-data
user. Since you have sudo permissions you can add your user (sam) to thewww-data
group and still be able to do what you need to do.To add your user to the
www-data
group:To change ownership of all the files to
www-data
user and group:To add group write permissions to all files in
/var/www
: