简体   繁体   English

在AWS中为文件夹分配权限

[英]Assigning Permissions to Folders in AWS

In one of application developed using Asp.Net, I want to allow users to upload documents/ images to a specific folder. 在使用Asp.Net开发的一种应用程序中,我希望允许用户将文档/图像上传到特定的文件夹。 I am getting error access denied while uploading to the folder. 上传到文件夹时,我拒绝访问错误。 How can I grant write permissions to the folder. 如何授予对该文件夹的写权限。 Any suggestions ? 有什么建议么 ?

Right-click the folder, select Properties, and then select the Security tab. 右键单击该文件夹,选择“属性”,然后选择“安全性”选项卡。 Click Edit. 单击编辑。 In the Permissions dialog box, select DefaultAppPool (or any other application pool you use) and then select the Write check box in the Allow column. 在“权限”对话框中,选择“ DefaultAppPool”(或您使用的任何其他应用程序池),然后在“允许”列中选中“写入”复选框。 More information can be found here . 可以在此处找到更多信息。

Are you trying to upload in javascript from the web browser? 您是否要从网络浏览器中以javascript上传? Or is the server (ASP.NET) application uploading? 还是服务器(ASP.NET)应用程序正在上传?

S3 resources are private by default. 默认情况下,S3资源是私有的。

Server Upload 服务器上传

Assuming it is your ASP.NET server application that is uploading the files to the bucket, you have some options. 假设是您的ASP.NET服务器应用程序将文件上传到存储桶,则您有一些选择。

Bucket Policy 铲斗政策

You could use a bucket policy to allow certain IAM users write access. 您可以使用存储桶策略来允许某些IAM用户进行写访问。 For example, the IAM user your ASP.NET application has credentials for. 例如,您的ASP.NET应用程序的IAM用户具有其凭据。 This tutorial explains how to do this: http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example1.html 本教程说明了如何执行此操作: http : //docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example1.html

User Policy 用户政策

Alternatively you could attach a policy to the IAM user that your ASP.NET application has credentials for. 或者,您可以将策略附加到您的ASP.NET应用程序具有其凭据的IAM用户。 This tutorial explains how to do this: http://docs.aws.amazon.com/AmazonS3/latest/dev/example-policies-s3.html#iam-policy-ex0 本教程说明了如何执行此操作: http : //docs.aws.amazon.com/AmazonS3/latest/dev/example-policies-s3.html#iam-policy-ex0

Client Upload 客户上传

If you want the client (javascript) application to do the upload and authenticate each end user, look at IAM Web Identity Federation. 如果要客户端(javascript)应用程序上载并验证每个最终用户,请查看IAM Web Identity Federation。 http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM