我遇到了问题,gcsfuse
但我也遇到了基本权限问题,这使得这个问题与这个论坛相关。我已经通过 SSH 进入了 google cloud 远程虚拟机实例。我可以毫无问题地创建目录并将存储桶安装到安装点。但完成后,我无法进入目录并列出文件。有问题的目录是temp_dir3
在这个系列命令中,我尝试更改所有权,但系统卡住了,我不得不按下控制键 c
kylefoley@kfoley76:/mnt/disks$ sudo chmod o+rx -R /mnt/disks/temp_dir3
kylefoley@kfoley76:/mnt/disks$ cd temp_dir3
kylefoley@kfoley76:/mnt/disks/temp_dir3$ cd ..
kylefoley@kfoley76:/mnt/disks$ sudo gcsfuse deduction3 /mnt/disks/temp_dir3
Using mount point: /mnt/disks/temp_dir3
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.
kylefoley@kfoley76:/mnt/disks$ cd temp_dir3
-bash: cd: temp_dir3: Permission denied
kylefoley@kfoley76:/mnt/disks$ sudo chmod o+rx -R /mnt/disks/temp_dir3
^C
在这个系列中,我认为 temp_dir3 可能因为文件太大而卡住了。毕竟它们占用了大约 200 GB。所以我创建了一个新目录并安装了一个较小的存储桶。但这也没有用。我也再次尝试了 temp_dir3,但也没有用。
kylefoley@kfoley76:/mnt/disks$ sudo mkdir -p /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks$ 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$ cd temp_dir4
-bash: cd: temp_dir4: Permission denied
kylefoley@kfoley76:/mnt$ sudo chmod a+w /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks$ cd temp_dir4
-bash: cd: temp_dir4: Permission denied
kylefoley@kfoley76:/mnt/disks$ sudo 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 chmod a+w /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks$ cd temp_dir4
-bash: cd: temp_dir4: Permission denied
以下是 temp_dir4 文件夹的统计数据。只有卸载存储桶后才能获取统计数据
kylefoley@kfoley76:/mnt/disks$ stat /mnt/disks/temp_dir4
stat: cannot stat '/mnt/disks/temp_dir4': Permission denied
kylefoley@kfoley76:/mnt/disks$ stat /mnt/disks
File: /mnt/disks
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 528485 Links: 6
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-01-29 04:11:23.616670923 +0000
Modify: 2020-01-29 04:11:20.780424372 +0000
Change: 2020-01-29 04:11:20.780424372 +0000
Birth: -
kylefoley@kfoley76:/mnt/disks$ sudo umount /mnt/disks/temp_dir4
kylefoley@kfoley76:/mnt/disks$ cd temp_dir4
kylefoley@kfoley76:/mnt/disks/temp_dir4$ stat temp_dir4
stat: cannot stat 'temp_dir4': No such file or directory
kylefoley@kfoley76:/mnt/disks/temp_dir4$ stat /mnt/disks/temp_dir4
File: /mnt/disks/temp_dir4
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 18055 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-01-29 04:11:58.379493620 +0000
Modify: 2020-01-29 04:11:20.780424372 +0000
Change: 2020-01-29 04:11:20.780424372 +0000
答案1
您必须使用“root”帐户用户来执行此操作:
sudo -i
现在您拥有所有权限。完成后
logout