質問: sftpサーバーのaws転送でアクセス許可が拒否されました cyberduckまたはfilezillaでサーバーにログインできますが、ホームディレクトリを読み取ることができません。 s3バケット"mybucket"が存在します。サイバーダックで"cannot readdir on root. please contact your web hosting service provider for assistance." and in filezilla "error: reading directory .: permission denied"サーバーに接続できても。一部のポリシーのユーザー権限が不足していますか?これらは私の許可です{ "version": "2012-10-17", "statement": [ { "sid": "visualeditor0", "effect": "allow", "action": [ "s3:listbucket", "s3:getbucketlocation" ], "resource": "arn:aws:s3:::mybucket" }, { "sid": "visualeditor1", "effect": "allow", "action": [ "s3:putobject", "s3:getobject", "s3:deleteobject" ], "resource": "arn:aws:s3:::mybucket/*" }, { "sid": "visualeditor2", "effect": "allow", "action": "transfer:*", "resource": "*" } ] } これらは私の信頼関係です:{ "version": "2012-10-17", "statement": [ { "effect": "allow", "principal": { "service": "s3.amazonaws.com" }, "action": "sts:assumerole" }, { "effect": "allow", "principal": { "service": "transfer.amazonaws.com" }, "action": "sts:assumerole" } ] }
回答: ユーザー役割は次のとおりです。{ "version": "2012-10-17", "statement": [ { "sid": "allowlistingofuserfolder", "action": [ "s3:listbucket", "s3:getbucketlocation" ], "effect": "allow", "resource": [ "arn:aws:s3:::bucket_name" ] }, { "sid": "homedirobjectaccess", "effect": "allow", "action": [ "s3:putobject", "s3:getobject", "s3:deleteobjectversion", "s3:deleteobject", "s3:getobjectversion" ], "resource": "arn:aws:s3:::bucket_name/*" } ] } ユーザーの信頼関係:{ "version": "2012-10-17", "statement": [ { "sid": "", "effect": "allow", "principal": { "service": "transfer.amazonaws.com" }, "action": "sts:assumerole" } ] } ユーザーのホームディレクトリは/ bucket_nameである必要があります