On my laptop I have a directory which contains a subdirectory, which in turn contains a bunch of HTML files. It looks like this:
% ls -lR 2000-09 2000-09: total 12 drwxrwxr-x 2 skip skip 12288 Nov 18 07:42 html 2000-09/html: total 648 -rw-r--r-- 1 skip skip 18489 Dec 4 2019 index.html -rw-r--r-- 1 skip skip 18489 Dec 4 2019 maillist.html -rw-r--r-- 1 skip skip 3468 Dec 4 2019 msg00000.html -rw-r--r-- 1 skip skip 3270 Dec 4 2019 msg00001.html -rw-r--r-- 1 skip skip 3194 Dec 4 2019 msg00002.html ...
I use gsutil to upload that directory to my bucket:
% gsutil -m cp -r 2000-09 gs://my-secret-bucket/ Copying file://2000-09/html/msg00070.html [Content-Type=text/html]... Copying file://2000-09/html/msg00060.html [Content-Type=text/html]... Copying file://2000-09/html/msg00029.html [Content-Type=text/html]... Copying file://2000-09/html/msg00052.html [Content-Type=text/html]... ...
It looks fine through the console. I see
2000-09, inside that
html, and inside that a bunch of files. So far, so good.
Now I open up a cloud shell and mount that bucket using
gcsfuse my-secret-bucket ~/mnt
but the resulting directory view appears empty:
me@cloudshell:~ (whatever)$ ls -l ~/mnt total 0 me@cloudshell:~ (whatever)$
Then I upload a couple files directly into my bucket (at the top level)
% gsutil -m cp wrench?.jpg gs://my-secret-bucket/ Copying file://wrench1.jpg [Content-Type=image/jpeg]... Copying file://wrench2.jpg [Content-Type=image/jpeg]... / [2/2 files][ 1.0 MiB/ 1.0 MiB] 100% Done Operation completed over 2 objects/1.0 MiB.
I confirm that they are there in the console, then list my mounted bucket again. They are visible and I can read them:
$ ls -l ~/mnt total 1049 -rw-r--r-- 1 me me 432451 Nov 18 19:09 wrench1.jpg -rw-r--r-- 1 me me 640526 Nov 18 19:09 wrench2.jpg me@cloudshell:~ (whatever) cksum mnt/wrench1.jpg 3659533210 432451 mnt/wrench1.jpg me@cloudshell:~ (whatever)$
It seems that files are visible at the top level, but I can't figure out how to make the directory and its contents visible. The web interface is extremely confusing for an old Unix guy like me who wants to see stuff like
rw-r--r-- when viewing long listings and execute
chmod 0644 ... to make it so when it doesn't look right. How do I make my 2000-09 object/folder/directory and (recursively) its entire contents visible? Ultimately, I want to have it visible to a GCP-hosted Flask web app (also owned by me, so not necessarily publicly visible).