Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Duplicati/Library/Backend/S3/S3IAM.cs')
-rw-r--r--Duplicati/Library/Backend/S3/S3IAM.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Duplicati/Library/Backend/S3/S3IAM.cs b/Duplicati/Library/Backend/S3/S3IAM.cs
index ab5b02c91..606f52d89 100644
--- a/Duplicati/Library/Backend/S3/S3IAM.cs
+++ b/Duplicati/Library/Backend/S3/S3IAM.cs
@@ -52,8 +52,8 @@ namespace Duplicati.Library.Backend
""s3:DeleteObject""
],
""Resource"": [
- ""arn:aws:s3:::bucket-name-and-path"",
- ""arn:aws:s3:::bucket-name-and-path/*""
+ ""arn:aws:s3:::bucket-name"",
+ ""arn:aws:s3:::bucket-name/*""
]
}
]
@@ -145,7 +145,9 @@ namespace Duplicati.Library.Backend
if (string.IsNullOrWhiteSpace(path))
throw new ArgumentException("Invalid value for path");
- return POLICY_DOCUMENT_TEMPLATE.Replace("bucket-name-and-path", path).Trim();
+ var bucketname = path.Split('/').First();
+
+ return POLICY_DOCUMENT_TEMPLATE.Replace("bucket-name", bucketname).Trim();
}
private Dictionary<string, string> CanCreateUser(string awsid, string awskey)