Share Objects
You can use access rights and predefined profiles (Canned ACLs) to control access to buckets and objects in your IONOS S3 Object Storage for different user groups. Users can then use a suitable S3 client to access the objects whose authorization profiles they match.
By default, buckets and objects are private, i.e. only the bucket owner can access them.
The content of a bucket is always accessible (as a list) as soon as the bucket is public, even if the objects it contains are private and can therefore neither be displayed nor downloaded.
Sharing objects through Access Control Lists
Prerequisites: When working with Objects, make sure you are inside of the Object Storage Management Console with full control of the Bucket. You should be able to set the Bucket to ACP Writable.
1. Click the Properties tab of the object you wish to share.
2. To grant access in the Object Canned ACL tab, select one of the ACL profiles.
Example: Public Read means the item is available to everyone but cannot be modified.
3. Confirm your entries by clicking on Save.
The item is available according to your settings.
Sharing objects with specific users
If you want to share your buckets and their content with users of the IONOS S3 Object Storage outside your own contract, you can use ACL sharing. All you need is the user’s contract user id in the format contract number|User UUID
.
1. Open the properties of the bucket that you would like to share by clicking on Properties in the respective tab.
2. In the Bucket Permissions tab, click + ADD NEW.
3. In the Grantee column, enter the contract user id of the user.
If you want to share the bucket or object with all users of a particular contract, you only have to enter the contract number as follows: contract number|
( e. g. 1701441|
).
Please note: IDs entered this way are not validated. An invalid ID has no effect.
4. Set the permission for the user by selecting the appropriate check box.
5. Confirm your entries by clicking on Save.
The item is shared according to your settings. If you ever wish to remove access, return to this view and click Delete.
Sharing objects through an URL
URLs can only be generated for objects owned by the bucket owner.
If you want to share content with users who do not have access to an S3 client application, you can share an object by making it publicly available through a URL. This URL can be generated by the Object Storage Management Console and can optionally be provided as an SSL-encrypted URL (using HTTPS).
Objects shared this way are always visible to everyone as they are public - regardless of their access permissions. You can, however, limit the number of downloads and the period of availability.
1. Open the Properties tab of the object that you would like to share.
2. Open the Public URL Access tab.
3. Check the Enable Public URL Access box. Further input fields are opened:
Maximum Downloads: specifies the maximum number of downloads for this URL. Enter
-1
for unlimited access.Current Downloads: shows the current number of downloads. To update this field, please reload the dialog in the Object Storage Management Console by means of a so-called "hard refresh".
Secure URL: (Optional) Activate the check box to generate an SSL-encrypted URL and increase the security of the file.
Expiration Date: (Required) Change the time at which the URL stops being valid. After expiration or change of the validity or the number of downloads, a new URL is generated and the link is no longer accessible. An error message will appear instead.
4. To generate the URL, click Apply.
The URL is generated and displayed. You can now copy the URL and share it with others or send it by email using the MAIL TO button. For the email to be sent out, your browser needs to be configured so that it can open your default web-based email program.
The file can be accessed using a browser. No S3 application is required.
Sharing objects on a static website
If you want to share content with users who do not have access to an S3 client application, you can configure a bucket as a website, which can be accessed using a standard web browser (instead of an S3 web client). This website needs to be static; it cannot deliver personalised content or run server-side scripts. This feature is useful for sharing a collection of objects.
A bucket-hosted website can be accessed as follows: ''http://<Bucketname>.<S3WebsiteEndpoint>/<IndexDocument>''
(e. g. http://mywebsite.s3-website-de-central.profitbricks.com/index.html).
Shared objects contained in this bucket are available as follows: http://<Bucketname>.<S3WebsiteEndpoint>/<Objectname>
. <Objectname>
may also contain folders.
A website configured with this feature can be accessed via HTTP and HTTPS (SSL).
Example
The bucket mywebsite
is used as a container for your website. “Static Website Hosting” has been enabled in its properties. It contains the start page (index.htm
) and a page that is displayed on error (404.htm
).
The bucket contains the img
folder in which images are stored. Among others, it contains the file test0.png
:
The file is available at: http://mywebsite.s3-website-de-central.profitbricks.com/img/test0.png
Files can be linked with each other through relative paths. If you want to link from index.htm
at the bucket (root) level to test0.png
, which is located in the img
folder of the mywebsite
bucket, you can refer to it with href=”img/test0.png”
.
Procedure
1. Create a bucket. Please mind the naming rules that apply! The bucket name is part of the URL of the static website.
2. Upload the website content to the bucket, which also includes the start page (usually index.htm
) and an error page (usually 404.htm
).
3. In the Properties of the bucket, open the Static Website Hosting tab.
4. Activate the Enable Website Hosting check box.
5. In the dialog box that appears, confirm that you want all objects to be public by clicking OK.
If you upload other objects to the bucket, please make sure that they are set to Public Read, otherwise, they are not accessible to others.
Index Document: Enter the start page that you uploaded (e.g.
index.htm
).Error Document (Optional): Enter the error page that you uploaded (e. g.
404.htm
).
6. Save your entries by clicking Save.
The website is now available at http://<Bucketname>.<S3WebsiteEndpoint>/<IndexDocument>
(e.g. http://mywebsite.s3-website-de-central.profitbricks.com/index.html)
Last updated