I am running a gcsfuse mount command in a startup script in my custom runtime docker, which fails with
Mounting file system...
Using mount point: /var/www/html/mount-point
Opening GCS connection...
Opening bucket...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1
stderr:
fusermount: failed to open /dev/fuse: Operation not permitted
however, ssh-ing into instance and executing the same script manually works. Manual startup is not acceptable since the instances are brought up and down by google at will.
Has anybody solved this problem?
This is my script:
export GOOGLE_APPLICATION_CREDENTIALS=/etc/gcloud/service-account.json
while :do FILE="" DIR="/var/www/html/mount-point"# init# look for empty dirif [ "$(ls -A $DIR)" ]; then echo "$DIR is mounted. Exit." breakelse echo "$DIR is not mounted. Trying to mount" gcsfuse -o rw -o allow_other --implicit-dirs --dir-mode 777 --file-mode 777 bucket_id /var/www/html/mount-pointweb/imgfi sleep 10 echo "Press [CTRL+C] to stop.."done
Thanks.