Edit WordPress sources on Synology via the shared folder “web”

Although all Plugins’ files can be edited directly within WordPress, you may sometimes prefer to open them with your favorite editor. Also, you could desire to edit some sources of WordPress…

And if it is quite easy to find the files to be modified under the share folder “web” (\\<SynologyHostname>\web), you will quickly notice that you may not save any change…

This is simply because the folder ‘wordpress’ and its content (on Synology) belong by default to the user “nobody”. Click to read the solution

To save your changes, you will first have to change the owner:

  • Check that Telnet is enabled on your Synology (Start Menu/Control Panel => Terminal)
  • Start the command (in a MS-Dos prompt): Telnet <SynologyHostname>
  • Log in with the root account and its password (same password as the Synology “admin” account)
  • Go to the physical folder associated to the shared folder “web”: cd /volume1/web/
  • Take ownership of WordPress’s whole content: chown -R <YourAccount> wordpress

For sure, <YourAccount> must exist on Synology, be the same as your windows account (I.e.: same name and same password) and have privileges on the folder “web”. Otherwise, create such an account (Synology’s Start Menu/Control Panel => User) and don’t forget to grant him Read/Write access on “web” (Via the Synology User’s tab “Privileges Setup”)

Once your changes saved, never forget to give back the ownership to “nobody”(*) otherwise WordPress won’t be able to update its plugins, themes, etc… automatically anymore.

(*) Indeed, by default and for security reasons, the httpd demon of apache runs with the account “nobody”. All folders/files created by httpd (a.o.: during the installation of WordPress) belong therefore to “nobody”. All changes executed by https (e.g.: files editing) are executed with the credentials of “nobody”…

Loading


Categories:

,

Tags:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *