is it possible to change the default fs owner for wordpress? In our shared dev environment, we don't have access to the www-data user. Files created by wordpress under wp-content have the owner www-data as they are created by the php/apache2 process.

What I found so far is this:

define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); 
define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) );

All users are in the www-data usergroup but I don't really want to set it to 775. I'd like to set a different default owner instead.

  • Answer short, yes. It is actually a server question but that you know?! chown -R yourname:www-data foldername chmod -R g+s foldername and about the chmod, I have non at 755 but that personally. Codex information. – Charles May 22 '18 at 15:59
  • @Charles I am looking to get wordpress to do the chown. I can't do it manually myself after the file was created as I don't have the permissions. – Tom M May 22 '18 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.