Thank you for using Bitnami. We use the following approach when configuring our solutions:
- We configure the ownership of the files and folders with the following command
sudo chown bitnami:daemon -R /path/to/the/folder
After running that command, bitnami (the user you use when using SSH connection or when uploading files through SFTP) will be the owner user of the files and folders while daemon (the user/group that Apache uses) will the owner group.
- Regarding the permissions of the different files, we give read/write permissions to all the files to the bitnami user
sudo chmod -R u+rw /path/to/the/folder
You could edit the different files using the bitnami user. Apache also needs read and write permissions in most of the folders
sudo chmod -R g+rw /path/to/the/folder
but there are some files (for example the configuration files) that we don't give write permissions due to security reasons (this way, only the bitnami user could edit it)
sudo chmod g-w /path/to/the/file
PS: It's important to mention that I mentioned the bitnami user and not the one that Google creates (using your Google's id) when launching the instance. In case you are using that other user, please run this command when connecting to the instance
sudo su bitnami
Let us know if you have any questions.