Hello Takashi Matsuo, Has the public folder permission option changed in Google App Engine Flexible ?
I am unable to use WP-ALL-IMPORT Plugin. I get "Uploads folder gs://gcs-media-uploads/1/wpallimport/logs must be writable” I also tried WP ALL IN ONE MIGRATION Plugin. I get "All in One WP Migration is not able to create */app/wordpress/wp-content/ai1wm-backups* folder. You will need to create this folder and grant it read/write/execute permissions (0777) for the All in One WP Migration plugin to function properly." Can you give more simple details to solve the problem? On Tuesday, April 25, 2017 at 3:34:19 AM UTC+5:30, Takashi Matsuo (Google) wrote: > > > Hi Donatas, > > We're re-designing the image build process. I think we should provide a > way to opt out from the permission locking behavior. I'll let you know when > it's available. > > For a time be-ing, you can use the custom runtime. > > ```app.yaml > env: flex > runtime: custom > ``` > > Dockerfile > ``` > > FROM gcr.io/google-appengine/php:latest > > > ENV DOCUMENT_ROOT /app/public > > RUN chmod +x /app/entrypoint.sh > > ENTRYPOINT ["/app/entrypoint.sh"] > CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] > ``` > > Then copy the entrypoint.sh > <https://github.com/GoogleCloudPlatform/php-docker/blob/master/php-nginx/entrypoint.sh> > > to your project directory and delete these lines: > ``` > # Lock down the DOCUMENT_ROOT > > > chown -R root.www-data ${DOCUMENT_ROOT} > chmod -R 550 ${DOCUMENT_ROOT} > ``` > > Then the public directory permission won't be overridden. > > Thanks, > > > On Mon, Apr 24, 2017 at 12:30 PM Donatas Petrauskas <[email protected] > <javascript:>> wrote: > >> I use PyroCMS and it requires public/app permissions to write admin area >> image thumbnails and public assets like css and js files. They can be lost, >> as they get regenerated if the files are not there. However, I do agree >> with Jordan, there shouldn't be any writes to the public folder on prod, >> but I'm stuck with that for now. I will have a look at the GCS option, >> thanks. >> >> >> On Monday, April 24, 2017 at 8:13:02 PM UTC+1, Takashi Matsuo (Google) >> wrote: >> >>> >>> Hi Donatas, >>> >>> What's the use case of writing to the public directory? If it is just >>> for writing temporary file (like temporary cache for performance), you can >>> still use other directories (/tmp, /app/otherdir etc). If you want to >>> dynamically update the content in the public directory, unfortunately it >>> won't work, because the files in the local disk are only available to the >>> specific instance, and they are volatile so that when the server restarted >>> for some reason, the files will be lost. >>> >>> As Jordan said, using Cloud Storage might be a good option. There is a >>> handy GCS stream wrapper >>> <https://github.com/GoogleCloudPlatform/google-cloud-php/blob/master/src/Storage/StreamWrapper.php> >>> >>> available, so you can use the GCS bucket as if they are local directory (of >>> course it's slower than the local disk). >>> >>> >>> On Mon, Apr 24, 2017 at 11:22 AM 'Jordan (Cloud Platform Support)' via >>> Google App Engine <[email protected]> wrote: >>> >> Is there a specific reason why you require the need to perform writes to >>>> your 'public/app' folder? Scalable applications in the cloud should >>>> normally never perform writes to the local filesystem, as data written in >>>> an App Engine instance is released with the instance when it is no longer >>>> needed (e.g. when incoming traffic reduces and your App Engine >>>> instances scale down >>>> <https://cloud.google.com/appengine/docs/flexible/php/an-overview-of-app-engine#instance_scaling> >>>> ). >>>> >>>> It is recommended you perform writes to a non-volatile/persistent >>>> location like Google Cloud Storage <https://cloud.google.com/storage/> or >>>> the Google Cloud Datastore <https://cloud.google.com/datastore/> that >>>> can be written/read by your application running in multiple App Engine >>>> instances. You can follow the Reading and Writing Files >>>> <https://cloud.google.com/appengine/docs/standard/php/googlestorage/> >>>> guide for PHP which explains how to use Google Cloud Storage as a wrapper >>>> for reading and writing files in an App Engine PHP app. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google App Engine" group. >>>> >>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>> >>> >>>> Visit this group at https://groups.google.com/group/google-appengine. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/google-appengine/cbe25784-7636-4b88-9386-e680877f6318%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/google-appengine/cbe25784-7636-4b88-9386-e680877f6318%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> -- Takashi >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/google-appengine. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/google-appengine/c55a7765-6eb1-40e7-bd14-208b11fd7987%40googlegroups.com >> >> <https://groups.google.com/d/msgid/google-appengine/c55a7765-6eb1-40e7-bd14-208b11fd7987%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- Takashi > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/8874e4a8-20ce-4f9d-8323-c005a8f5d4f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
