It’s not an issue but I can’t understand how it works.
For wordpress to work it needs or FTP access or direct control over the WP folder.
I’ve wordpress installed with 775 permissions and userx:userx as user and group so, it’s not using www-data and users have no write perms…
How it’s working???
userx is not on the www-data group or something, they have nothing in common…
Maybe this is not a Virtualmin question but an Apache/WordPress question but I installed it using the Virtualmin install script and I’ve all with Virtualmin and it may be a config made bc of this…
Ubuntu Server 22.04.4 and Virtualmin 7.10.0(the latest version)
Using wordpress 6.5.3 installed with the install script and using a MariaDB DB.
Everything created with an owner user, not with a sudo user, all the folders and files with userx:usex not www-data:www-data and perms 775 so others can’t write.
The way it is, when you install a plugin on WordPress or something it should ask you for an FTP conection to be able to change files but it’s not, wordpress is able to write files without permissions and without FTP.
I have wordpress configured to force direct write so is impossible for it to use FTP
This is exactly the right way to do it! You should never follow the practice of writing files to a user’s home directory using the web-server user, like www-data! All files under a user’s home should be owned by the virtual server owner user.
This is a flawed paradigm created during the mod_php era.
None of this is correct; just connect to your server using the virtual server owner user, and it will work just fine.
WordPress will write files with the correct user already, since you’re using PHP-FPM.