I am migrating some Joomla and WordPress sites from shared hosting to VPS servers at Digital Ocean. The servers will be running Ubuntu with a LAMP stack.
Each site will have the following permission requirements:
- Allow the configuration.php (Joomla) to be updated using the administrator panel.
- Allow all directories and files within
/var/www/domain.com
to be editable by a custom user created by me. This will happen via SFTP for one single user.
- Allow the Joomla and WordPress update systems (core and plugins) to work from the respective admin panels. This should happen without the FTP Layer enabled (Joomla) or the equivalent on WordPress.
- Allow for image/media uploads (images for Joomla and wp-content/uploads for WordPress) to be allowed from the Joomla and WordPress admin panels.
- When new files or directories are created, they should inherit the user/group ownership and permissions that were previously set. Files or directories will be created from within Joomla/WordPress or via SFTP.
I have been testing out various user/group ownership settings and file permissions from https://askubuntu.com/questions/46331/how-to-avoid-using-sudo-when-working-in-var-www/46371#46371, but nothing has fully worked so far. Either making config updates via the admin panels work and SFTP does not or vice-versa.
Any suggestions or tips are greatly appreciated.