I'm using a Linux/Debian.
In the following series of commands I was in directory temp_dir4. I mounted a google storage bucket to that directory and then changed the permissions otherwise I would have gotten a permission denied error when I ran ls.
kylefoley@kfoley76:/mnt/disks/temp_dir4$ sudo -i chmod o+rx -R /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks/temp_dir4$ sudo gcsfuse deduction1 /mnt/disks/temp_dir4
Using mount point: /mnt/disks/temp_dir4
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.
kylefoley@kfoley76:/mnt/disks/temp_dir4$ ls
Next I ran a program over at a different directory which was a python program that would just read the files in the directory. This program was:
lst1 = os.listdir('/mnt/disks/temp_dir4/')
print (lst1)
I got the following error:
File "fix_mistakes.py", line 1733, in <module>
temp17()
File "fix_mistakes.py", line 1729, in temp17
lst1 = os.listdir('/mnt/disks/temp_dir4/')
PermissionError: [Errno 13] Permission denied: '/mnt/disks/temp_dir4/'
I then tried to go back to that directory and change the permissions but I could not:
kylefoley@kfoley76:/mnt/disks$ sudo -i chmod o+rx -R /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks$ cd temp_dir4
-bash: cd: temp_dir4: Permission denied
kylefoley@kfoley76:/mnt/disks$ sudo -i chmod a+w /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks$ cd temp_dir4
-bash: cd: temp_dir4: Permission denied
Also, I need to change the permissions of temp_dir4 so that when I run that python program I won't get hit with another permission denied error.