Using five lines below install gcsfuse
on a brand new Ubuntu14 instance:
export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install gcsfuse
Now create a folder on a local disk (this folder is to be used as the mounting point for Google Bucket
). Give this folder a full access:
sudo mkdir /home/shared
sudo chmod 777 /home/shared
Using gcsfuse
command mount Google bucket to the mounting-point folder we created earlier. But first, list the names of the Google Buckets that are linked to your Google Project:
gsutil ls
The Google Project I work on has a single bucket named "my_bucket". Knowing a bucket name I can run gcsfuse
command that will mount my_bucket
Bucket on to a local /home/shared
mounting-folder:
gcsfuse my_bucket /home/shared
The execution of this command logs that it was successful:
Using mount point: /home/shared
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.
But now when I try to create another folder inside of mapped /home/shared
mounting-point folder I get the error message:
mkdir /home/shared/test
Error:
mkdir: cannot create directory ‘/home/shared/test’: Input/output error
Trying to fix the problem I successfully un-mount
it using:
fusermount -u /home/shared
and map it back but now using another gcsfuse
command-line:
mount -t gcsfuse -o rw,user my_bucket /home/shared
But it results to the exactly same permission issue.
At very last I have made an attempt to fix this permission issue by editing /etc/fstab
configuration file with:
sudo nano /etc/fstab
and then appending a line to the end of the file:
my_bucket /home/shared gcsfuse rw,noauto,user
but it did not help to solve this issue.
What needs to be changed to allow all the users a full access to the mapped Google Bucket so the users are able to create, delete and modify the files and folders stored on Google Bucket?