0
votes

Apologies if I am missing something obvious, here is my issue:

  1. My employer wants to be able to auto update Wordpress/Plugins from the dashboard using define('FS_METHOD', 'direct'); in the the wp-config (he doesn't want to run a password-authenticated FTP server). This requires setting the files to be owned by the apache user.

  2. My employer also wants to be able to login via SFTP with a key and update files

If I make the files owned by the apache user, he cannot edit them via the SFTP user, and if I make them owned by the SFTP user, apache cannot modify them. I know I can use group permissions, but Wordpress file default is 644 which, if I am correct, means that only the owner can edit the files, not the group.

Is there any solution to this? Thanks!

EDITED: To clarify FTP/SFTP situation

1
" he doesn't want to run an FTP server " and " also wants to be able to login via FTP and update files " is not exactly logical / possible IMHO... - Obmerk Kronen
@ObmerkKronen Sorry I meant to say, he wants to be able to login via SFTP using a key and edit files, but he does not want to run a standard FTP server with password authentication. - user2766838

1 Answers

1
votes

Change the owner to 664 and create the group as you indicated, where is the problem?