How to Share Links to Files with File Permissions and Presigned URLs
Validated on 12 May 2026 • Last edited on 13 May 2026
Spaces Object Storage is an S3-compatible service for storing and serving large amounts of data. The built-in Spaces CDN minimizes page load times, improves performance, and reduces bandwidth and infrastructure costs.
You can share files in a Spaces bucket by making individual files Public or by creating presigned URLs for Private files.
By default, files in a Spaces bucket are Private. You can change file permissions at any time after upload. You can also create presigned URLs to give time-limited access to a private file.
To control whether users can view a bucket’s full file list, set the bucket’s file listing permissions. To grant programmatic access to a bucket, use Spaces access keys with S3-compatible tools such as AWS SDKs or Cyberduck.
Change File Permissions Using the Control Panel
To change file permissions, go to the Control Panel, in the left menu, click STORAGE, click Spaces Object Storage, click the bucket with the file you want to change file permissions for.
In the Files tab, you can either update a singular file or multiple files:
- For a singular file, on the right of the file, click …, and then click Manage Permissions to open the Manage Permissions window.
- To change permissions for multiple files at once, click the checkbox on the left of all the files you want to edit, and then in the top-right, click Actions, and then click Manage Permissions to open the Manage Permissions window.
Then, you can either click:
- Public files are visible to anyone on the internet.
- Private files are only visible to users with access to the bucket.
Then, click Update.
Change File Permissions Using Automation
You can also change file permissions by using an S3-compatible tool or the Spaces S3-compatible API.
File permissions are controlled through object ACLs. When you set a file to Public, the object becomes accessible to anyone with its URL. When you set a file to Private, only authorized users can access it.
Change File Permissions via an S3-Compatible Tool
To change file permissions from the command line, use an S3-compatible tool such as s3cmd or the AWS CLI.
For example, with s3cmd, you can make a file public like this:
s3cmd setacl s3://your-space-name/your-object-key --acl-publicTo make the file private again, use:
s3cmd setacl s3://your-space-name/your-object-key --acl-privateChange File Permissions via API
To change file permissions via API, send a request to the object ACL endpoint using the Spaces S3-compatible API.
For more details, see the Spaces API reference.
Create a Presigned URL Using the Control Panel
Bucket owners can create a presigned URL to give time-limited access to a private file. A presigned URL for Spaces includes X-Amz- query parameters that define request details such as credentials and expiration time.
To create a presigned URL, go to the Control Panel, in the left menu, click STORAGE, click Spaces Object Storage, click the bucket with the file you want to share. In the Files tab, find the file you want to share, and then on the right, click …, and then click Quick Share to open the Quick share window.
Under the Sharing duration section, click 1 hour, 6 hours, 1 day, 3 days, or 7 days. Choose a shorter duration for temporary access and a longer duration if recipients may need more time to use the link.
Then, copy either the Path-style file URL or the Virtual-hosted style file URL. Both URLs point to the same file. Choose the format that is compatible with the tool, application, or integration you are using.
Create a Presigned URL Using Automation
You can also create presigned URLs by using an S3-compatible client or library.
Create a Presigned URL via the AWS CLI
To create a presigned URL from the command line, use the AWS CLI with the presign command:
aws s3 presign s3://your-space-name/your-object-key --expires-in 3600This example creates a presigned URL that is valid for one hour.
Create a Presigned URL via a Client Library
To create a presigned URL with more request options, use an S3-compatible client library such as Boto3 for Python:
import boto3
session = boto3.session.Session()
client = session.client(
"s3",
region_name="nyc3",
endpoint_url="https://nyc3.digitaloceanspaces.com",
aws_access_key_id="YOUR_ACCESS_KEY",
aws_secret_access_key="YOUR_SECRET_KEY",
)
url = client.generate_presigned_url(
ClientMethod="get_object",
Params={
"Bucket": "your-space-name",
"Key": "your-object-key",
"ResponseContentType": "text/plain",
},
ExpiresIn=3600,
)This example creates a presigned URL that is valid for 1 hour and sets the response Content-Type to text/plain.
For more details, see the Spaces API reference.