我使用以下命令从 S3 安装了存储桶
sudo goofys -o allow_other mybucket /mnt/buckets/mybucket/
在mybucket里面,有一堆子目录。
当我对某些子目录进行 rsync 或 cp(使用 sudo)时,我遇到了一个问题:
sudo cp -rv /mnt/buckets/mybucket/a /destination
cp: cannot access '/mnt/buckets/mybucket/a/b/c': Input/output error
sudo rsync -arv --delete /mnt/buckets/mybucket/a /destination
rsync: [sender] readdir("/mnt/buckets/mybucket/a/b/c"): Input/output error (5)
IO error encountered -- skipping file deletion
但是,如果我复制或 rsync 完整路径 sudo
cp -rv /mnt/buckets/mybucket/a/b/c /destination
则完全没有问题。
我做到了
ls -al
,所有目录和子目录都拥有root和其他用户的所有权限
当我第一次执行
ls -al /mnt/buckets/mybucket/a/b/c
时,我收到此错误:
ls: reading directory '/mnt/buckets/mybucket/a/b/c': Input/output error
但是当我不断运行相同的命令后,我终于看到了它下面的所有目录和文件。
有谁知道可能是什么问题吗?
我必须按如下方式设置 rsync 权限:
setsebool -P rsync_client 1
setsebool -P rsync_full_access 1
setsebool -P rsync_export_all_ro 1
了解更多详情,请查看:https://www.mankier.com/8/rsync_selinux