0

Всем привет.

В /etc/fastab прописано

mystorage1 /storage/mystorage1 gcsfuse rw,allow_other,implicit_dirs
mystorage2 /storage/mystorage2 gcsfuse rw,allow_other,implicit_dirs
mystorage3 /storage/mystorage3 gcsfuse rw,allow_other,implicit_dirs
mystorage4 /storage/mystorage4 gcsfuse rw,allow_other,implicit_dirs

И с этим проблем нет.

После загрузки файла в сторадж и установки в нем прав доступа AllUsers - ЧТЕНИЕ (СКРИН), данный файл становится общедоступным, с этим всё ок.

Google Cloud Storage Но после редактирования файла с помощью консоли (nano /storage/mystorage4/news/some.txt), файл теряет флаг AllUsers, то есть перестает быть общедоступным.

Также и при копировании с помощью cp /var/www/123/bitrix/blocks/10.1.two_cols_big_img_text_and_text_blocks/preview.jpg /storage/mystorage4/news/ флаг AllUsers отсутствует!

Собственно, возможно, у gcsfuse есть специальный флаг что бы все файлы по умолчанию имели флаг AllUsers?

Либо, как написать правильно скрипт (желательно баш, но позволительно и питон3), который при изменении файлов через консольные редакторы и по фтп будет выполнять примерно такие команды?

gsutil -m acl ch -u AllUsers:R gs://somestorage/somepic/pic.jpg
gsutil -m setmeta -h "Cache-Control:public, max-age=31536000" gs://somestorage/somepic/pic.jpg

1 ответ 1

0

С правами решилось следующим образом.

Google Cloud Storage

А вот с Cache-Control пока что не удалось решить.

Metadata: Cloud Storage FUSE does not transfer metadata along with the file when uploading to Cloud Storage. This means that if you wish to use Cloud Storage FUSE as an uploading tool, you will not be able to set metadata such as content type and acls as you would with other uploading methods. If metadata properties are critical, considering using gsutil, the JSON API or the Google Cloud Platform Console.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.