Search code examples
wordpresspantheon

failed to open stream: Permission denied in /srv/bindings/ wordpress pantheon


I have a wordpress site hosted on pantheon

And have developed a custom plugin, using the same admin user can upload a file and respective file need to be manipulated.

Now everything works fine on the dev environment. but when deploying the same on pantheon Test environment and trying to upload a file getting the following error message

Warning: move_uploaded_file(/srv/bindings/24b37de9be394646ae9bc42fd0dfc2bd/code/wp-content/plugins/.......

): failed to open stream: Permission denied in /srv/bindings/24b37de9be394646ae9bc42fd0dfc2bd/code/wp-content/plugins/.....

If I am not wrong, I need to give access permission to the respective folder but I am not sure How to do so. on the pantheon Test environment and followed by Live environment

so need help on setting permission on a pantheon Test environment folder


Solution

  • Pantheon's test and live environments don't permit modifying folder/file permissions outside wp-content/uploads for WP sites.

    Write Access to Environments: "Any modules for Drupal or plugins for WordPress that need to write to the codebase (and assume write access) need a symlink added so that they will instead write to the file system. For more information, read Using Extensions That Assume Write Access."