Score:0

Correct user/group ownership and file permissions for Joomla and WordPress sites running on Ubuntu server

in flag

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.

MohammadReza moeini avatar
us flag
Please clear your command for assign permission to user group based on files and folder to debugging process , also check your log file after change permission to find which user and group in your file and folder don't have permission
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.