Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Setting permissions for mount point

I'm using a persistent disk mount with:

"volumes": [
{
"deviceName": "scratchSSD",
"mountPath": "${workDir}",
"mountOptions": "rw,async"
}
]

in my POST request to the batch API.    This disk gets mounted to ${workDir} with rwxr-xr-x and is owned by the user root.  However, my docker image does not run as root, and consequently I can't write to the disk.

Is there a way to control the users and/or permissions of the mount point?  I've tried setting uid and umask in mountOptions, but neither are recognized.

Thanks!

 

0 9 1,974