All Products
Search
Document Center

Object Storage Service:put-symlink

Last Updated:Mar 20, 2026

Creates a symbolic link that points to an object in a bucket.

Use cases

Symbolic links are unique to OSS. Use them to:

  • Create short, human-readable aliases for objects with long or complex keys.

  • Maintain backward-compatible paths when reorganizing your object key structure.

  • Point multiple logical paths to a single physical object without duplicating data.

Usage notes

  • OSS does not validate the target object when creating a symbolic link — it does not check whether the target exists, whether its storage class is valid, or whether the target is accessible.

  • When API operations such as GetObject access the target through a symbolic link, OSS checks both the access control list (ACL) of the symbolic link and the ACL of the target object.

Permissions

By default, an Alibaba Cloud account has full permissions. RAM users and RAM roles under an Alibaba Cloud account have no permissions by default. Grant the required permissions through RAM policy or Bucket Policy.

APIActionCondition
PutSymlinkoss:PutObjectAlways required
PutSymlinkoss:PutObjectTaggingRequired only when specifying object tags via x-oss-tagging

Syntax

ossutil api put-symlink --bucket <value> --key <value> --symlink-target <value> [flags]

Parameters

ParameterTypeDescription
--bucketstringName of the bucket.
--keystringFull path (object key) of the symbolic link to create.
--symlink-targetstringObject key of the target that the symbolic link points to.
--object-aclstringAccess control list (ACL) of the object.
--forbid-overwritestringWhether to overwrite an object with the same name during the PutSymlink operation.
--storage-classstringStorage class of the object that you want to upload.
The put-symlink command maps to the PutSymlink API operation. For all supported flags, see Command-line options.

Example

Create a symbolic link examplelink that points to targetobject in examplebucket:

ossutil api put-symlink --bucket examplebucket --key examplelink --symlink-target targetobject