All Products
Search
Document Center

Object Storage Service:ossutil 2.0 CLI

Last Updated:May 09, 2026

The ossutil 2.0 command-line tool lets you efficiently manage Alibaba Cloud OSS resources across multiple operating systems. It enables you to quickly upload, download, sync, and manage files. This tool is ideal for developers, O&M engineers, and enterprises managing large-scale data migration and daily O&M.

Operating system

Architecture

Download link

SHA256 checksum

Linux

x86_32

ossutil-2.3.0-linux-386.zip

29cbd49b6c401c740c2f036cdf9d44ee8da340b16bdb3be71a33bcbebbe35ec5

x86_64

ossutil-2.3.0-linux-amd64.zip

3ae4d9fc85a7a6e9f5654d1599766f1a3a42a3692870887b5ae9338d582ef65a

arm32

ossutil-2.3.0-linux-arm.zip

8aff883c676961a11c89ac98b807fafa54fb424851d0557b1691b9d320324b9e

arm64

ossutil-2.3.0-linux-arm64.zip

f6c95ba0c2d2ef30290af686ce4d706c701f4734ce8090bee4288a77e3f1d764

macOS

x86_64

ossutil-2.3.0-mac-amd64.zip

8437fdd3ef1a3eb12310f61fcf1c00a5bff5cdab47b4fea815527472e7cf896c

arm64

ossutil-2.3.0-mac-arm64.zip

058fd048f321f8c80def8b748030531646eefe3a82837bf16b581ba7d9c84ac7

Windows

x86_32

ossutil-2.3.0-windows-386.zip

ae5f20b0bfe2aadf61c87931cbb342f743e266bb56b49dace16f59942305c1ea

x86_64

ossutil-2.3.0-windows-amd64.zip

98209156987667b39fd12a0c7b940342900daef61a9306ea7f34acf17f287da2

x86_64

ossutil-2.3.0-windows-amd64-go1.20.zip

0b9249d1c1437a9f052a9bf5eeaf1d4358b515e08efa82a3b7048950ce7efdea

Quick start

To use the ossutil 2.0 command line interface, you need to:

image

Install ossutil

Linux

  1. Install the unzip tool.

    Alibaba Cloud Linux

    sudo yum install -y unzip

    CentOS

    sudo yum install -y unzip

    Ubuntu

    sudo apt install -y unzip
  2. Select the installation package for your operating system and architecture (Linux x86 32-bit, Linux x86 64-bit, Linux ARM 32-bit, or Linux ARM 64-bit), or use curl to download it. The following example shows how to use the curl command on a Linux x86_64 system:

    curl -o ossutil-2.3.0-linux-amd64.zip https://gosspublic.alicdn.com/ossutil/v2/2.3.0/ossutil-2.3.0-linux-amd64.zip
  3. In the download directory, unzip the package:

    unzip ossutil-2.3.0-linux-amd64.zip
  4. Go to the ossutil-2.3.0-linux-amd64 directory.

    cd ossutil-2.3.0-linux-amd64
  5. Grant execute permissions to the ossutil file:

    chmod 755 ossutil
  6. Run the following command to make ossutil globally available.

    sudo mv ossutil /usr/local/bin/ && sudo ln -s /usr/local/bin/ossutil /usr/bin/ossutil
  7. To verify that ossutil is successfully installed, run the ossutil command.

    ossutil

    The installation is successful if ossutil displays its help information.

Windows

  1. Install ossutil.

    1. Select the installation package that corresponds to your operating system and architecture (Windows x86 32-bit, Windows x86 64-bit, or Windows 7, Windows 8, Windows Server 2008R2).

    2. Unzip the downloaded .zip package to a destination folder, and then navigate to the extracted directory.

    3. Copy the path of the extracted ossutil folder. You will add this path to a system environment variable.

      1. Click the path bar of the current directory and copy the displayed folder path.

      2. Open the Environment Variables dialog box. In the System variables section, find and double-click the Path variable. Click New, and then paste the copied path of the ossutil folder into the new entry box.

    4. Verify the installation:

      ossutil

      The installation is successful if ossutil displays its help information.

macOS

  1. Select the installation package for your operating system and architecture (macOS x86 64-bit or macOS ARM 64-bit), or use curl to download the package. The following example shows how to use the curl command on a macOS ARM64 system:

    curl -o ossutil-2.3.0-mac-arm64.zip  https://gosspublic.alicdn.com/ossutil/v2/2.3.0/ossutil-2.3.0-mac-arm64.zip
  2. In the download directory, unzip the package:

    unzip ossutil-2.3.0-mac-arm64.zip
  3. Go to the ossutil-2.3.0-mac-arm64 directory.

    cd ossutil-2.3.0-mac-arm64
  4. Grant execute permissions to the ossutil file:

    chmod 755 ossutil
  5. Run the following command to make ossutil globally available.

    sudo mv ossutil /usr/local/bin/ && sudo ln -s /usr/local/bin/ossutil /usr/bin/ossutil
  6. Verify the installation:

    ossutil

    The installation is successful if ossutil displays its help information.

Configure ossutil

To avoid errors from missing settings, we recommend using the ossutil config wizard to quickly configure your AccessKey ID, AccessKey Secret, and region ID. For advanced options, see the Configuration guide to manually configure access credentials.

This example shows how to use the configuration wizard to quickly configure the AccessKey pair of a RAM user as your access credentials.

Linux

  1. Enter the configuration command.

    ossutil config
  2. When prompted, set the path for the configuration file. You can press Enter to use the default path.

    Please enter the config file name,the file name can include path(default /root/.ossutilconfig, carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):

    By default, ossutil uses /root/.ossutilconfig as the configuration file.

  3. Follow the prompts to set the AccessKey ID, AccessKey Secret, and region ID.

    1. Enter your AccessKey ID.

      Please enter Access Key ID [****************id]:yourAccessKeyID
    2. Enter your AccessKey Secret.

      Please enter Access Key Secret [****************sk]:yourAccessKeySecret
    3. Enter the region of the OSS data center. If you leave this blank, it defaults to cn-hangzhou.

      Please enter Region [ap-southeast-1]:ap-southeast-1
    4. Enter the endpoint for the OSS data center. If you do not require a custom endpoint, you can press Enter to skip this parameter.

      After you set the region, ossutil uses the corresponding public endpoint by default. For example, if you set the region-id to ap-southeast-1, the default public endpoint is https://oss-ap-southeast-1.aliyuncs.com.

      If you require a custom endpoint for the region where your OSS data center is located, enter the endpoint. For example, if you want to access OSS from other Alibaba Cloud services in the same region, use an internal endpoint, such as https://oss-ap-southeast-1-internal.aliyuncs.com.

      Please enter Endpoint (optional, use public endpoint by default) [None]: https://oss-ap-southeast-1-internal.aliyuncs.com

    The following table describes the parameters.

    Parameter

    Required

    Description

    accessKeyID

    Yes

    The AccessKey pair for your account. To learn how to obtain an AccessKey pair, see Create an AccessKey pair.

    To quickly create a RAM user with OSS management permissions and an AccessKey pair, use a Resource Orchestration Service (ROS) script:

    On the Create Stack page of the Resource Orchestration Service (ROS) console, select the confirmation checkbox under Security Confirmation, and then click Create.

    1.png

    After the stack is created, copy the AccessKey pair from the Outputs tab.

    image

    accessKeySecret

    Yes

    Region

    Yes

    The ID of the region where the bucket is located. This topic uses the Singapore region as an example. Set this parameter to ap-southeast-1. For more information about the IDs of other regions, see Regions and endpoints.

    endpoint

    No

    The endpoint of the region where the bucket is located. If you do not manually set an endpoint, a public endpoint is automatically generated based on the region. You must explicitly specify an internal endpoint. For example, this topic uses the public endpoint for the Singapore region. Set this parameter to https://oss-ap-southeast-1.aliyuncs.com.

    If you want to access OSS from other Alibaba Cloud services in the same region, use an internal endpoint. Set this parameter to https://oss-ap-southeast-1-internal.aliyuncs.com.

    For more information about the endpoints of different regions, see Regions and endpoints.

    Important

    Due to a policy change to improve compliance and security, starting March 20, 2025, new OSS users must use a custom domain name (CNAME) to perform data API operations on OSS buckets located in Chinese mainland regions. Default public endpoints are restricted for these operations. Refer to the official announcement for a complete list of the affected operations. If you access your data via HTTPS, you must bind a valid SSL Certificate to your custom domain. This is mandatory for OSS Console access, as the console enforces HTTPS.

Windows

  1. Enter the configuration command.

    ossutil config
  2. When prompted, set the path for the configuration file. You can press Enter to use the default path.

    Please enter the config file name,the file name can include path(default "C:\Users\issuser\.ossutilconfig", carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):

    By default, ossutil uses C:\Users\issuser\.ossutilconfig as the configuration file.

  3. Follow the prompts to set the AccessKey ID, AccessKey Secret, and region ID.

    1. Enter your AccessKey ID.

      Please enter Access Key ID [****************id]:yourAccessKeyID
    2. Enter your AccessKey Secret.

      Please enter Access Key Secret [****************sk]:yourAccessKeySecret
    3. Enter the region of the OSS data center. If you leave this blank, it defaults to cn-hangzhou.

      Please enter Region [ap-southeast-1]:ap-southeast-1
    4. Enter the endpoint for the OSS data center. If you do not require a custom endpoint, you can press Enter to skip this parameter.

      After you set the region, ossutil uses the corresponding public endpoint by default. For example, if you set the region-id to ap-southeast-1, the default public endpoint is https://oss-ap-southeast-1.aliyuncs.com.

      If you require a custom endpoint for the region where your OSS data center is located, enter the endpoint. For example, if you want to access OSS from other Alibaba Cloud services in the same region, use an internal endpoint, such as https://oss-ap-southeast-1-internal.aliyuncs.com.

      Please enter Endpoint (optional, use public endpoint by default) [None]: https://oss-ap-southeast-1-internal.aliyuncs.com

    The following table describes the parameters.

    Parameter

    Required

    Description

    accessKeyID

    Yes

    The AccessKey pair for your account. To learn how to obtain an AccessKey pair, see Create an AccessKey pair.

    To quickly create a RAM user with OSS management permissions and an AccessKey pair, use a Resource Orchestration Service (ROS) script:

    On the Create Stack page of the Resource Orchestration Service (ROS) console, select the confirmation checkbox under Security Confirmation, and then click Create.

    1.png

    After the stack is created, copy the AccessKey pair from the Outputs tab.

    image

    accessKeySecret

    Yes

    Region

    Yes

    The ID of the region where the bucket is located. This topic uses the Singapore region as an example. Set this parameter to ap-southeast-1. For more information about the IDs of other regions, see Regions and endpoints.

    endpoint

    No

    The endpoint of the region where the bucket is located. If you do not manually set an endpoint, a public endpoint is automatically generated based on the region. You must explicitly specify an internal endpoint. For example, this topic uses the public endpoint for the Singapore region. Set this parameter to https://oss-ap-southeast-1.aliyuncs.com.

    If you want to access OSS from other Alibaba Cloud services in the same region, use an internal endpoint. Set this parameter to https://oss-ap-southeast-1-internal.aliyuncs.com.

    For more information about the endpoints of different regions, see Regions and endpoints.

    Important

    Due to a policy change to improve compliance and security, starting March 20, 2025, new OSS users must use a custom domain name (CNAME) to perform data API operations on OSS buckets located in Chinese mainland regions. Default public endpoints are restricted for these operations. Refer to the official announcement for a complete list of the affected operations. If you access your data via HTTPS, you must bind a valid SSL Certificate to your custom domain. This is mandatory for OSS Console access, as the console enforces HTTPS.

macOS

  1. Enter the configuration command.

    ossutil config
  2. When prompted, set the path for the configuration file. You can press Enter to use the default path.

    Please enter the config file name,the file name can include path(default "/Users/user/.ossutilconfig", carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands): 

    By default, ossutil uses /Users/user/.ossutilconfig as the configuration file.

  3. Follow the prompts to set the AccessKey ID, AccessKey Secret, and region ID.

    1. Enter your AccessKey ID.

      Please enter Access Key ID [****************id]:yourAccessKeyID
    2. Enter your AccessKey Secret.

      Please enter Access Key Secret [****************sk]:yourAccessKeySecret
    3. Enter the region of the OSS data center. If you leave this blank, it defaults to cn-hangzhou.

      Please enter Region [ap-southeast-1]:ap-southeast-1
    4. Enter the endpoint for the OSS data center. If you do not require a custom endpoint, you can press Enter to skip this parameter.

      After you set the region, ossutil uses the corresponding public endpoint by default. For example, if you set the region-id to ap-southeast-1, the default public endpoint is https://oss-ap-southeast-1.aliyuncs.com.

      If you require a custom endpoint for the region where your OSS data center is located, enter the endpoint. For example, if you want to access OSS from other Alibaba Cloud services in the same region, use an internal endpoint, such as https://oss-ap-southeast-1-internal.aliyuncs.com.

      Please enter Endpoint (optional, use public endpoint by default) [None]: https://oss-ap-southeast-1-internal.aliyuncs.com

    The following table describes the parameters.

    Parameter

    Required

    Description

    accessKeyID

    Yes

    The AccessKey pair for your account. To learn how to obtain an AccessKey pair, see Create an AccessKey pair.

    To quickly create a RAM user with OSS management permissions and an AccessKey pair, use a Resource Orchestration Service (ROS) script:

    On the Create Stack page of the Resource Orchestration Service (ROS) console, select the confirmation checkbox under Security Confirmation, and then click Create.

    1.png

    After the stack is created, copy the AccessKey pair from the Outputs tab.

    image

    accessKeySecret

    Yes

    Region

    Yes

    The ID of the region where the bucket is located. This topic uses the Singapore region as an example. Set this parameter to ap-southeast-1. For more information about the IDs of other regions, see Regions and endpoints.

    endpoint

    No

    The endpoint of the region where the bucket is located. If you do not manually set an endpoint, a public endpoint is automatically generated based on the region. You must explicitly specify an internal endpoint. For example, this topic uses the public endpoint for the Singapore region. Set this parameter to https://oss-ap-southeast-1.aliyuncs.com.

    If you want to access OSS from other Alibaba Cloud services in the same region, use an internal endpoint. Set this parameter to https://oss-ap-southeast-1-internal.aliyuncs.com.

    For more information about the endpoints of different regions, see Regions and endpoints.

    Important

    Due to a policy change to improve compliance and security, starting March 20, 2025, new OSS users must use a custom domain name (CNAME) to perform data API operations on OSS buckets located in Chinese mainland regions. Default public endpoints are restricted for these operations. Refer to the official announcement for a complete list of the affected operations. If you access your data via HTTPS, you must bind a valid SSL Certificate to your custom domain. This is mandatory for OSS Console access, as the console enforces HTTPS.

Run commands

  1. Create a bucket.

    ossutil mb oss://examplebucket

    The following output indicates that the bucket examplebucket was created.

    0.668238(s) elapsed
  2. Upload a file to the bucket.

    1. Create a local file named uploadFile.txt.

      echo 'Hello, OSS!' > uploadFile.txt
    2. Upload a file to the examplebucket bucket.

      ossutil cp uploadFile.txt oss://examplebucket

      The following output indicates that the file has been successfully uploaded to examplebucket.

      Success: Total 1 file, size 12 B, Upload done:(1 objects, 12 B), avg 44 B/s
      
      0.271779(s) elapsed
  3. Download a file.

    Download the uploadFile.txt file from the examplebucket bucket to the localfolder directory.

    ossutil cp oss://examplebucket/uploadFile.txt localfolder/

    The following output indicates that the file was successfully downloaded to the localfolder directory.

    Success: Total 1 object, size 12 B, Download done:(1 files, 12 B), avg 74 B/s
    
    0.162447(s) elapsed
  4. List the files in the examplebucket bucket.

    ossutil ls oss://examplebucket

    The following output indicates that the files in the examplebucket bucket were successfully listed.

    LastModifiedTime                   Size(B)  StorageClass   ETAG                                  ObjectName
    2024-11-26 14:35:29 +0800 CST           12      Standard   1103F650EB2C292D179A032D2A97B0F5      oss://examplebucket/uploadFile.txt
    Object Number is: 1
    
    0.124679(s) elapsed
  5. Delete the uploadFile.txt file from the examplebucket bucket.

    ossutil rm oss://examplebucket/uploadFile.txt

    The following output indicates that uploadFile.txt was successfully deleted from the examplebucket bucket.

    0.295530(s) elapsed
  6. Delete the examplebucket bucket.

    ossutil rb oss://examplebucket

    The following output indicates that the examplebucket bucket was successfully deleted.

    0.478659(s) elapsed

Configuration

ossutil is highly flexible and can be configured using a configuration file, environment variables, or command-line options.

Configuration precedence

ossutil reads settings in the following order of precedence:

command-line options (such as -i, -k, and -e) > environment variables (such as OSS_ACCESS_KEY_ID) > configuration file (~/.ossutilconfig)

Note
  • Starting from version 2.2.0, you can use the --ignore-env-var command-line option to ignore environment variables that have the OSS_ prefix.

  • Starting from version 2.3.0, the --job, --parallel, --bigfile-threshold, --part-size, and --write-buffer-size options can be set in the configuration file. Append them in key=value format, such as job=10, to the corresponding profile section in the configuration file, or use the ossutil config set command to write them. Command-line options have a higher priority than the configuration file.

Configuration file

You can configure ossutil by using a configuration file. The default path is ~/.ossutilconfig, or you can specify a custom path by using the -c flag. If you use the default configuration file, you can run ossutil commands directly without specifying the file path. For example:

ossutil ls oss://examplebucket

If you use a custom configuration file path, such as /path/yourconfig, you must use the -c option to specify the path. For example:

ossutil -c /path/yourconfig ls oss://examplebucket

Configuration file format

The configuration file uses the INI format, which groups settings into sections of key-value pairs. You can use the --profile option to select a specific section. By default, ossutil uses the settings in the [default] section. To use a different set of parameters, you can create and reference other sections.

Sections and key-value pairs

Each section in the configuration file is identified by a name enclosed in square brackets [ ], and settings within the section are in the key=value format. For example:

[default]
accessKeyID = "your-access-key-id"
accessKeySecret = "your-access-key-secret"
  • The settings in the section use the key=value format.

  • Section names and keys are case-insensitive.

  • Configuration parameter keys support multiple formats, such as all lowercase, camelCase, kebab-case (hyphen-separated), and snake_case (underscore-separated). For example, accesskeyid, accessKeyId, access-key-id, and access_key_id are all treated as the same parameter name.

  • Lines that start with a number sign (#) are comments.

Supported section types

Section name

Description

Notes

[default]

Stores the default settings. This section is used when the --profile option is not set.

A simplified form of [profile default].

[profile name]

Configures parameters referenced using --profile name.

Supports referencing other configurations by using source_profile.

[buckets name]

Configures endpoints for specific buckets, including region, endpoint, and addressing style.

Supports inline notation.

Note

You can use the config command to view and set configurations. For more information, see config.

Profile

This section configures access credentials and global parameters. The following parameters are supported:

  • Access credential parameters

    Parameter

    Alias

    Description

    mode

    /

    Specifies the authentication mode.

    Valid values: AK, StsToken, RamRoleArn, EcsRamRole, and Anonymous.

    access-key-id

    accessKeyId

    access_key_id

    The AccessKey ID used to access OSS.

    access-key-secret

    accessKeySecret

    access_key_secret

    The AccessKey Secret used to access OSS.

    sts-token

    stsToken

    sts_token

    The security token used to access OSS.

    role-arn

    roleArn

    role_arn

    The ARN of the RAM role. This parameter is mainly used in RamRoleArn mode.

    role-session-name

    roleSessionName

    role_session_name

    The session name. This parameter is mainly used in RamRoleArn mode.

    ecs-role-name

    ecsRoleName

    ecs_role_name

    The role name. This parameter is mainly used in EcsRamRole mode.

    credential-process

    credentialProcess

    credential_process

    Specifies an external command.

    credential-uri

    credentialUri

    credential_uri

    Specifies a URI from which to obtain access credentials.

    oidc-provider-arn

    oidcProviderArn

    oidc_provider_arn

    Specifies the ARN of the OIDC provider in the format acs:ram::account-id:oidc-provider/provider-name.

    oidc-token-file-path

    oidcTokenFilePath

    oidc_token_file_path

    Specifies the file path where the OIDC token is stored.

    credential-process-timeout

    credentialProcessTimeout

    credential_process_timeout

    Specifies the timeout for an external credential request, in seconds. The default value is 15 seconds, and the maximum value is 600 seconds (10 minutes). For example, credential-process-timeout = 60 specifies a 60-second timeout. This feature is supported in version 2.0.3 and later.

  • Global parameters

    Parameter

    Alias

    Description

    region

    /

    The region ID. This parameter is required.

    loglevel

    /

    The log level. Valid values:

    • off (default)

    • info

    • debug

    read-timeout

    readTimeout

    read_timeout

    The timeout for client read and write requests, in seconds. Default value: 20.

    connect-timeout

    connectTimeout

    connect_timeout

    The timeout for client connections, in seconds. Default value: 10.

    retry-times

    retryTimes

    retry_times

    The number of times to retry a failed request. Default value: 10.

    skip-verify-cert

    skipVerifyCert

    skip_verify_cert

    Skips server-side digital certificate verification.

    sign-version

    signVersion

    sign_version

    The signature algorithm version used for requests. Valid values:

    • v1

    • v4 (default)

    output-format

    outputFormat

    output_format

    The output format. Valid values:

    • raw (default)

    • json

    • xml

    • yaml

    addressing-style

    addressingStyle

    addressing_style

    The format of the request address. Valid values:

    • virtual (default)

    • path

    • cname

    language

    /

    The display language.

    endpoint

    /

    The endpoint for the service. This parameter is optional.

  • Other parameters

    Parameter

    Alias

    Description

    source-profile

    sourceProfile

    source_profile

    References parameters from a specified profile. For example:

    [profile cred]
    access-key-id=ak
    access-key-secret=sk
    
    [profile dev]
    region=cn-hangzhou
    source-profile=cred

    buckets

    /

    References parameters from a specified buckets section.

    [profile dev]
    region=cn-hangzhou
    access-key-id=ak
    access-key-secret=sk
    buckets=dev-bucket
    
    [buckets dev-bucket]
    bucket-name-hz =
     endpoint=oss-cn-hangzhou-internal.aliyuncs.com
    bucket-name-bj =
     region=cn-beijing

    endpoint-suffix-list-path-style

    /

    Specifies the list of endpoint suffixes that automatically use the path-style request mode. Multiple suffixes are separated by a comma (,). Supported since version 2.2.0.

    Example 1: endpoint-suffix-list-path-style=DEFAULT

    Example 2: endpoint-suffix-list-path-style=DEFAULT,.path-style.com

    DEFAULT indicates the built-in default list, which is currently .privatelink.aliyuncs.com.

Buckets

This section configures mappings between buckets and endpoints. It supports a nested structure where subsections for individual buckets are defined using bucket-name =. The format is as follows:

[buckets name]
bucket-name = 
  key=value

In this format, name is the name of the buckets section, bucket-name is the name of a specific bucket, and key=value represents a configuration parameter. The following parameters are supported:

Parameter

Alias

Description

region

/

The region where the data center is located.

If not set, the region value from the profile that references this parameter is used.

endpoint

/

The endpoint for the service. This parameter is optional.

addressing-style

addressingStyle

addressing_style

The format of the request address. Valid values:

virtual (default): Uses the virtual-hosted-style request address format.

path: Uses the path-style request address format.

cname: Uses the CNAME request address format.

The following is an example of a buckets section:

[buckets dev-bucket]
bucket-hz-01 = 
  region=cn-hangzhou
bucket-hz-02 = 
  region=cn-hangzhou
  endpoint=test.com
  addressing-style=cname
bucket-bj-01 = 
  region=cn-beijing

Configure environment variables

Linux

  1. Run the following commands to append the environment variable settings to the ~/.bashrc file:

    echo "export OSS_ACCESS_KEY_ID='your-access-key-id'" >> ~/.bashrc
    echo "export OSS_ACCESS_KEY_SECRET='your-access-key-secret'" >> ~/.bashrc
  2. Run the following command to apply the changes:

    source  ~/.bashrc
  3. Run the following commands to verify that the environment variables have taken effect:

    echo $OSS_ACCESS_KEY_ID
    echo $OSS_ACCESS_KEY_SECRET

macOS

  1. In the terminal, run the following command to view the default shell type:

    echo $SHELL
  2. Zsh

    1. Run the following commands to append the environment variable settings to the ~/.zshrc file:

      echo "export OSS_ACCESS_KEY_ID='your-access-key-id'" >> ~/.zshrc
      echo "export OSS_ACCESS_KEY_SECRET='your-access-key-secret'" >> ~/.zshrc
    2. Run the following command to apply the changes:

      source ~/.zshrc
    3. Run the following commands to verify that the environment variables have taken effect:

      echo $OSS_ACCESS_KEY_ID
      echo $OSS_ACCESS_KEY_SECRET

    Bash

    1. Run the following commands to append the environment variable settings to the ~/.bash_profile file:

      echo "export OSS_ACCESS_KEY_ID='your-access-key-id'" >> ~/.bash_profile
      echo "export OSS_ACCESS_KEY_SECRET='your-access-key-secret'" >> ~/.bash_profile
    2. Run the following command to apply the changes:

      source ~/.bash_profile
    3. Run the following commands to verify that the environment variables have taken effect:

      echo $OSS_ACCESS_KEY_ID
      echo $OSS_ACCESS_KEY_SECRET

Windows

  1. Run the following commands in Command Prompt (CMD):

    setx OSS_ACCESS_KEY_ID "your-access-key-id"
    setx OSS_ACCESS_KEY_SECRET "your-access-key-secret"
  2. Open a new CMD window.

  3. In the new CMD window, run the following commands to verify that the environment variables have taken effect:

    echo %OSS_ACCESS_KEY_ID%
    echo %OSS_ACCESS_KEY_SECRET%

The following environment variables are supported:

Environment variable

Parameter

OSS_ACCESS_KEY_ID

access-key-id

OSS_ACCESS_KEY_SECRET

access-key-secret

OSS_SESSION_TOKEN

sts-token

OSS_ROLE_ARN

role-arn

OSS_ROLE_SESSION_NAME

role-session-name

OSS_REGION

region

OSS_ENDPOINT

endpoint

OSSUTIL_CONFIG_FILE

config-file

OSSUTIL_PROFILE

profile

Command-line options

ossutil provides multiple command-line options, including global command-line options. Command-line options have the highest precedence and override parameters set in the configuration file or environment variables.

Important

Passing access keys through command-line options can expose them in log systems, creating a security risk. Use this method with caution.

ossutil ls oss://examplebucket -i "your-access-key-id" -k "your-access-key-secret" --region cn-hangzhou

Access credentials

RAM user AccessKey pair

If your application runs in a secure environment, requires long-term access to OSS, and cannot rotate credentials frequently, you can initialize the credential provider with the AccessKey pair (AccessKey ID and AccessKey Secret) of an Alibaba Cloud account or a RAM user. This method requires manual maintenance of an AccessKey pair, which increases both security risks and maintenance overhead.

Configuration file

Create the following configuration file and save it as ~/.ossutilconfig.

[default]
accessKeyID = yourAccessKeyID
accessKeySecret = yourAccessKeySecret
region=ap-southeast-1

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

Environment variables

export OSS_ACCESS_KEY_ID=yourAccessKeyID
export OSS_ACCESS_KEY_SECRET=yourAccessKeySecret
ossutil ls oss://examplebucket

Command-line options

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -i yourAccessKeyID -k yourAccessKeySecret

Temporary security credential

If your application requires temporary access to OSS, you can initialize the credential provider with a temporary security credential (AccessKey ID, AccessKey Secret, and security token) obtained from Security Token Service (STS). This method requires manual maintenance of the security token, increasing security risks and complexity. You must also refresh the token manually for repeated temporary access.

Configuration file

Create the following configuration file and save it as ~/.ossutilconfig.

[default]
accessKeyID = yourSTSAccessKeyID
accessKeySecret = yourSTSAccessKeySecret
stsToken = yourSecurityToken
region=ap-southeast-1

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

Environment variables

export OSS_ACCESS_KEY_ID=yourSTSAccessKeyID
export OSS_ACCESS_KEY_SECRET=yourSTSAccessKeySecret
export OSS_SESSION_TOKEN=yourSecurityToken
ossutil ls oss://examplebucket

Command-line options

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -i yourSTSAccessKeyID -k yourSTSAccessKeySecret -t yourSecurityToken --region cn-hangzhou

RAM role ARN

If your application needs authorized access to OSS, for example, to access OSS across Alibaba Cloud accounts, you can use RAMRoleARN to initialize the credential provider. This method uses STS tokens internally. By specifying the ARN (Alibaba Cloud Resource Name) of a RAM role, the credentials tool obtains an STS token from the STS service and calls the AssumeRole API to request a new STS token before the session expires. In addition, you can assign a value to policy to restrict the RAM role to a smaller set of permissions.

Important
  • An Alibaba Cloud account has full permissions on its resources. If the AccessKey pair of an Alibaba Cloud account is leaked, it poses a significant security risk to your system. We recommend using the AccessKey pair of a RAM user with the minimum required permissions instead.

  • To create an AccessKey pair for a RAM user, see Create an AccessKey pair. The AccessKey ID and AccessKey Secret of a RAM user are displayed only at the time of creation. You must save them immediately. If you forget the AccessKey pair, create a new one to rotate your credentials.

  • To obtain a RAM role ARN, see Create a role.

Create the following configuration file and save it as ~/.ossutilconfig. This configuration cannot be set by using environment variables or command-line options.

[default]
accessKeyID = yourAccessKeyID
accessKeySecret = yourAccessKeySecret
mode = RamRoleArn
roleArn = acs:ram::137918634953****:role/Alice
roleSessionName = session_name_example
region=ap-southeast-1

To query objects in the examplebucket bucket, run the following command:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

ECS instance RAM role

If your application runs on an ECS instance, an ECI instance, or a worker node of Container Service for Kubernetes, we recommend that you use an ECSRAMRole to initialize the credential provider. This method uses STS tokens in its underlying implementation. An ECSRAMRole allows you to associate a role with an ECS instance, an ECI instance, or a worker node of Container Service for Kubernetes to automatically refresh the STS token within the instance. This method eliminates the need to provide an AccessKey (AK) or an STS token and removes the risks associated with manual maintenance. For more information about how to obtain an ECSRAMRole, see Create a role.

Note

This method cannot be configured by using environment variables.

EcsRamRole mode

Configuration file

Create the following configuration file and save it as ~/.ossutilconfig.

[default]
mode = EcsRamRole
# The ecsRoleName parameter is optional. If it is not set, the role is automatically obtained.
ecsRoleName = EcsRamRoleOss 
region=ap-southeast-1

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

CLI

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket --mode EcsRamRole

EcsRamRole IMDSv2 mode

Note

The EcsRamRole IMDSv2 mode is supported in ossutil 2.2.0 and later.

Configuration file

Create the following configuration file and save it as ~/.ossutilconfig.

[default]
mode = Ali-EcsRamRole
# The ecsRoleName parameter is optional. If it is not set, the role is automatically obtained.
ecsRoleName = EcsRamRoleOss 
region=ap-southeast-1

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

CLI

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket --mode Ali-EcsRamRole

OIDC role ARN

After you configure a worker node RAM role in Container Service for Kubernetes, applications in Pods on that node can obtain the STS token for the associated role through the metadata service, just like applications deployed on ECS instances. However, if untrusted applications, such as applications submitted by customers with closed-source code, are deployed on the container cluster, you may not want them to obtain the STS token of the RAM role that is associated with the worker node instance through the metadata service. To avoid compromising the security of your cloud resources while allowing these untrusted applications to securely obtain the required STS tokens and implement application-level least privilege, you can use the RRSA (RAM Roles for Service Account) feature. This method is based on STS tokens. The Alibaba Cloud container cluster creates and mounts a corresponding service account OIDC token file for each application Pod and injects the related configuration information into environment variables. A credentials tool then retrieves the configuration information from the environment variables and calls the AssumeRoleWithOIDC API of the STS service to exchange the OIDC token for an STS token that is associated with the role. This method does not require you to provide an Access Key (AK) or an STS token, which eliminates the risks associated with manually maintaining AKs or STS tokens. For more information, see Configure RAM permissions for a ServiceAccount by using RRSA to implement pod-level permission isolation.

Create the following configuration file and save it as ~/.ossutilconfig. You cannot specify this configuration by using environment variables or command-line options.

[default]
mode = oidcRoleArn
# Specifies the ARN (Aliyun Resource Name) of the OIDC provider. The format is acs:ram::account-id:oidc-provider/provider-name.
OIDCProviderArn=acs:ram::113511544585****:oidc-provider/TestOidcProvider
# Specifies the file path where the OIDC token is stored.
OIDCTokenFilePath=OIDCTokenFilePath
# The ARN of the role to assume. The format is acs:ram::account-id:role/role-name.
roleArn=acs:ram::113511544585****:role/testoidc
# A custom role session name to distinguish different tokens.
roleSessionName= TestOidcAssumedRoleSession
region=ap-southeast-1

Run the following command to query objects in examplebucket:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

External process credentials

ossutil can execute an external command to obtain credentials. The external process returns the credentials to ossutil through standard output (stdout).

Note
  • To avoid security risks, the command that generates credentials must not be accessible to unauthorized users or processes.

  • The command that generates credentials must not write any secret information to stderr or stdout, as this information could be captured in logs and exposed to unauthorized users.

The external command can return a long-term credential or a temporary credential in the following formats.

Long-term credential

{
  "AccessKeyId" : "ak",
  "AccessKeySecret" : "sk"
}

Temporary credential

{
  "AccessKeyId" : "ak",
  "AccessKeySecret" : "sk",
  "Expiration" : "2023-12-29T07:45:02Z",
  "SecurityToken" : "token"
}

Create the following configuration file and save it to ~/.ossutilconfig. These settings cannot be configured by using environment variables or command-line options.

[default]
mode = Process
credentialProcess = user-cmd
region=ap-southeast-1

Run the following command to query objects in the examplebucket bucket:

ossutil ls oss://examplebucket -c ~/.ossutilconfig

Anonymous access

If you only need to access OSS resources with the public-read permission, you can use anonymous access without providing any credentials.

ossutil cat oss://bucket/public-object --mode Anonymous

Command reference

ossutil provides three types of commands: high-level commands, API-level commands, and helper commands.

Command structure

The basic syntax for ossutil commands is as follows:

ossutil command [argument] [flags]  

ossutil command subcommond [argument] [flags]  

ossutil topic
  • argument: A string argument.

  • flags: Options with a short name format (-o[=value]/ -o [ value]) and a long name format (--options[=value]/--options[ value]). If you specify an exclusive flag more than once, only the last value is used.

The following are examples of commands:

  • Command: ossutil cat oss://bucket/object

  • Command with a subcommand: ossutil api get-bucket-cors --bucket bucketexample

  • Help topic: ossutil filter

Command list

  • High-level commands

    These commands are for managing buckets and objects. You can use them to create and delete buckets, copy data, and modify object properties.

    Command name

    Meaning

    mb

    Create a bucket

    rb

    Delete a bucket

    du

    Get the storage size of a bucket or a specified prefix

    stat

    Display the description of a bucket or an object

    mkdir

    Create an object whose name ends with the suffix character /

    append

    Append content to an appendable object

    cat

    Concatenate object content to standard output

    ls

    List buckets or objects

    cp

    Upload, download, or copy objects

    rm

    Delete objects in a bucket

    set-props

    Set the properties of an object

    presign

    Generate a signed URL for an object

    restore

    Restore an object from the frozen state to a readable state

    revert (restore version)

    Revert an object to a specified version

    sync

    Synchronize a local directory or objects from a source to a destination

    hash

    Calculate the hash value of a file or an object

  • API-level commands: These commands provide direct access to API operations and their configuration arguments.

    Note

    Only some commands are listed. Run ossutil api -h to view all commands.

    Command name

    Description

    put-bucket-acl

    Sets or modifies the access permissions of a bucket.

    get-bucket-acl

    Gets the access permissions of a bucket.

    ....

    put-bucket-cors

    Sets the cross-origin resource sharing (CORS) rules for a bucket.

    get-bucket-cors

    Gets the CORS rules for a bucket.

    delete-bucket-cors

    Deletes the CORS rules for a bucket.

  • Helper commands: Use these commands to manage configuration files and access additional help topics.

    Command name

    Description

    help

    Gets help information.

    config

    Creates a configuration file to store configuration items and access credentials.

    update

    Updates the version.

    version

    Displays version information.

    probe

    Runs a probe.

Command option types

Option type

Flag

Description

String

--option string

  • A string argument can contain alphanumeric characters, symbols, and spaces from the ASCII character set.

  • Enclose values that contain spaces in quotation marks.

For example: --acl private.

Boolean

--option

Enables or disables a flag.

For example: --dry-run.

Integer

--option Int

An unsigned integer.

For example: --read-timeout 10.

Timestamp

--option Time

A timestamp in ISO 8601 format (DateTime or Date).

For example: --max-mtime 2006-01-02T15:04:05.

Byte unit suffix

--option SizeSuffix

The default unit is the byte (B). You can also use suffixes. Supported suffixes are: K (KiB) = 1024 bytes, M (MiB), G (GiB), T (TiB), P (PiB), and E (EiB).

For example, for a minimum size of 1024 bytes:

--min-size 1024

--min-size 1K

Time unit suffix

--option Duration

A time duration. The default unit is seconds. Supported suffixes are: ms (milliseconds), s (seconds), m (minutes), h (hours), d (days), w (weeks), M (months), and y (years).

Decimal values are supported. For example: 1.5 days.

--min-age 1.5d

String list

--option strings

Supports specifying the flag multiple times. A single flag can also accept multiple values separated by a comma (,).

Supports multiple instances of a single value.

For example: --metadata user=jack,email=ja**@test.com --metadata address=china

String array

--option stringArray

Supports specifying the flag multiple times. Each instance accepts only a single value.

For example: --include *.jpg --include *.txt.

Load data from other sources

While arguments are typically provided on the command line, complex values can be loaded from a file. You can also pipe data from standard input, which is useful for chaining commands.

  • Starting with file:// indicates that it is loaded from a file path.

  • A parameter value of - indicates that data is loaded from standard input.

For example, to set the cross-origin resource sharing (CORS) settings for a bucket, you can load the configuration from a JSON file. The cors-configuration.json file is as follows:

{
  "CORSRule": {
    "AllowedOrigin": ["www.aliyun.com"],
    "AllowedMethod": ["PUT","GET"],
    "MaxAgeSeconds": 10000
  }
}
ossutil api put-bucket-cors --bucket examplebucket --cors-configuration file://cors-configuration.json

Alternatively, you can provide the CORS configuration directly as the option's value. The compact JSON string is as follows:

{"CORSRule":{"AllowedOrigin":["www.aliyun.com"],"AllowedMethod":["PUT","GET"],"MaxAgeSeconds":10000}}
ossutil api put-bucket-cors --bucket examplebucket --cors-configuration  "{\"CORSRule\":{\"AllowedOrigin\":[\"www.aliyun.com\"],\"AllowedMethod\":[\"PUT\",\"GET\"],\"MaxAgeSeconds\":10000}}"

The following example shows how to load arguments from standard input:

cat cors-configuration.json | ossutil api put-bucket-cors --bucket examplebucket --cors-configuration -

Control command output

Output format

For the subcommands of the api command and the du and stat commands, you can adjust the output format by using the --output-format parameter. The supported formats are as follows:

Format name

Description

raw

The output is the raw data returned by the server.

json

The output is formatted as a JSON string.

yaml

The output is formatted as a YAML string.

xml

The output is formatted as an XML string.

For example, the original content for get-bucket-cors is as follows:

ossutil api get-bucket-cors --bucket bucketexample
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>
  <CORSRule>
    <AllowedOrigin>www.aliyun.com</AllowedOrigin>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>GET</AllowedMethod>
    <MaxAgeSeconds>10000</MaxAgeSeconds>
  </CORSRule>
  <ResponseVary>false</ResponseVary>
</CORSConfiguration>

The JSON output is as follows:

ossutil api get-bucket-cors --bucket bucketexample --output-format json
{
  "CORSRule": {
    "AllowedMethod": [
      "PUT",
      "GET"
    ],
    "AllowedOrigin": "www.aliyun.com",
    "MaxAgeSeconds": "10000"
  },
  "ResponseVary": "false"
}

Filter output

ossutil provides a built-in, JSON-based client-side filtering feature through the --output-query value flag.

Note

This option is supported only for ossutil api subcommands.

This feature is based on JMESPath syntax. When you use this feature, the output is converted to JSON, filtered by using JMESPath, and then displayed in the specified output format. For more information about JMESPath syntax, see JMESPath Specification.

For example, to display only the AllowedMethod content for the get-bucket-cors command, run the following command:

ossutil api get-bucket-cors --bucket bucketexample --output-query CORSRule.AllowedMethod --output-format json
[
  "PUT",
  "GET"
]

Human-readable format

For high-level commands (du, stat), the --human-readable option is provided to display byte and quantity data in a human-readable format. Byte data is converted to a format with Ki, Mi, Gi, Ti, or Pi suffixes (base 1024), and quantity data is converted to a format with k, m, g, t, or p suffixes (base 1000).

Example: Raw mode

ossutil stat oss://bucketexample
ACL                         : private
AccessMonitor               : Disabled
ArchiveObjectCount          : 2
ArchiveRealStorage          : 10
ArchiveStorage              : 131072
...
StandardObjectCount         : 119212
StandardStorage             : 66756852803
Storage                     : 66756852813
StorageClass                : Standard
TransferAcceleration        : Disabled

Human-readable mode

ossutil stat oss://bucketexample --human-readable
ACL                         : private
AccessMonitor               : Disabled
ArchiveObjectCount          : 2
ArchiveRealStorage          : 10
ArchiveStorage              : 131.072k
...
StandardObjectCount         : 119.212k
StandardStorage             : 66.757G
Storage                     : 66.757G
StorageClass                : Standard
TransferAcceleration        : Disabled

Command return codes

When you run ossutil in a script, you can check its final return code to verify the outcome. This code indicates whether the operation succeeded and lets you handle errors programmatically.

Linux

Run the command to obtain the return code: echo $?.

Windows

Run the command to obtain the return code: echo %errorlevel%.

macOS

Run the command to obtain the return code: echo $?.

Return code

Description

0

The command operation was successful. The request sent to the server executed successfully, and the server returned a 200 response.

1

Invalid parameter. This error occurs when a required subcommand or parameter is missing, or an unknown command or parameter is used.

2

The command was parsed successfully and a request was sent to the specified service, but the service returned an error (a non-2xx response).

3

A non-server error was encountered when calling the OSS Go SDK.

4

Some requests failed during a batch operation, such as cp or rm.

5

Interruption error. A command was canceled by pressing ctrl +c during execution.

Command-line options

Some commands require parameters to specify a target or an option. For these commands, provide the required values. For example:

ossutil ls --profile dev

The command ossutil ls --profile dev specifies the dev configuration profile. For options that require a parameter value, separate the option name from the value with a space or an equal sign (=), such as --profile dev or --profile=dev. Enclose parameter values that contain spaces in double quotation marks to ensure they are parsed correctly, for example, --description "OSS bucket list".

Global command-line options

Parameter

Type

Description

-i, --access-key-id

string

Specifies the AccessKey ID for accessing OSS.

-k, --access-key-secret

string

Specifies the AccessKey Secret for accessing OSS.

--addressing-style

string

Specifies the request addressing style. Valid values:

  • virtual (default): Enables the virtual-hosted-style.

  • path: Enables the path mode.

  • cname: Enables the custom domain name mode.

-c, --config-file

string

Specifies the path to the configuration file. The default path is ~/.ossutilconfig.

--connect-timeout

int

Connection timeout in seconds. The default value is 10.

-n, --dry-run

/

Shows the operations that would be performed without executing them.

-e, --endpoint

string

Specifies the service endpoint to connect to.

-h, --help

/

Displays help information.

--language

string

Specifies the display language.

--loglevel

string

Specifies the log level. Valid values:

  • off (default)

  • info

  • debug

--mode

string

Specifies the authentication mode. Valid values:

  • AK: Authenticate with an AccessKey pair.

  • StsToken: Authenticate with a temporary security credential.

  • EcsRamRole: Authenticate with an ECS instance RAM role.

  • Anonymous: Use anonymous access.

--output-format

string

Specifies the output format. The default value is raw.

--output-query

string

Specifies the JMESPath query condition.

--profile

string

Specifies the profile to use from the configuration file.

-q, --quiet

/

Suppresses all output except for errors.

--read-timeout

int

Timeout in seconds for read and write requests. The default value is 20.

--region

string

The destination region for the request. For example, you can set the value to cn-hangzhou.

--retry-times

int

Specifies the number of times to retry a failed request. The default value is 10.

--sign-version

string

Specifies the signature algorithm version for requests. Valid values:

  • v1

  • v4 (default)

--skip-verify-cert

/

Disables server-side SSL certificate verification.

-t, --sts-token

string

Specifies the STS token for accessing OSS.

--proxy

string

Specifies the proxy server to use. This option is available in version 2.0.1 and later.

Valid values:

  • Direct configuration: Directly specify the proxy server details. Examples:

    • http://proxy.example.com:8080

    • https://proxy.example.com:8443

  • env: Use the proxy settings from the HTTP_PROXY and HTTPS_PROXY environment variables. You must configure these environment variables in your operating system. Examples:

    • HTTP_PROXY=http://proxy.example.com:8080

    • HTTPS_PROXY=https://proxy.example.com:8443

    After you configure these environment variables, set the value of the proxy server option to env to automatically apply the proxy settings from these variables.

--log-file

string

Specifies the log output file. This option is available in version 2.0.1 and later. The value can be:

  • -: Writes logs to standard output (stdout).

  • File path: Writes logs to the specified file path.

If this option is not specified, logs are written to the default log file.

--cloudbox-id 

string

Specifies the CloudBox ID. This option is used in CloudBox scenarios and is available in version 2.1.0 and later.

--ignore-env-var

/

Ignores all environment variables prefixed with OSS_. This option is available in version 2.2.0 and later.

--bind-address

string

Specifies the local IP address (IPv4 or IPv6) to bind outbound connections to. This option is available in version 2.2.0 and later.

--account-id

string

Specifies the account ID. This is used for identity verification and resource ownership in vector bucket scenarios. This option is available in version 2.2.0 and later.

--user-agent

string

Appends the specified value to the default User-Agent string. This option is available in version 2.2.2 and later.

Common command-line options

Command scope

Supported options

All high-level commands

  • --encoding-type string: Specifies the encoding type for input object or file names. The valid value is url.

  • --request-payer string: Specifies who pays for the request. To use the pay-by-requester mode, set this value to requester.

Commands that support batch operations

  • --start-after/--end-with (, ] : Sets the key range for a query. The range is exclusive of the start value and inclusive of the end value.

  • filter options: Allows you to set filter conditions based on object or file names, directories, sizes, timestamps, and object metadata. For detailed filtering rules, see Filter options.

  • --limited-num: Limits the number of results returned by the query API.

  • --recursive/-r: Recursively processes all files or objects in a directory, including its subdirectories.

  • --dirs/-d: Accesses only files or objects in the root directory, excluding subdirectories.

    Note

    For objects, this is simulated by using a delimiter. This requires scanning all objects with the specified prefix, which can be time-consuming if there are many objects.

  • --force/-f: Forces the operation without a confirmation prompt.

  • --list-objects: Lists objects using the ListObjects API operation.

Commands that support destination filtering rules

  • --update: Copies only when the source file has a more recent or identical modification time than the destination file.

  • --size-only: Compares only file sizes and synchronizes only files with different sizes.

  • --checksum: Compares CRC-64 checksums. This option first compares file sizes. If the sizes are the same, it then compares the CRC-64 checksums. If a CRC-64 checksum is missing on either side, the files are considered different. This option is valid only for object-to-object copies.

  • --ignore-existing: Skips files that already exist at the destination. This option is available in version 2.0.3 and later.

Commands that support single objects

--version-id string: Specifies the version ID of the object.

Commands that support list mode

--list-format: Specifies the format of the list file. Valid values: plain, inventory.

--list-manifest-from: Reads the description of the list file format from a file. This parameter is required when --list-format is set to inventory.

FAQ

Ossutil error: region must be set in sign version 4

Cause: You did not specify the region ID when you configured ossutil 2.0.

Solution: To prevent errors, configure the following required items: AccessKey ID, AccessKey Secret, and region ID. The region ID is required because the signature version has been upgraded to V4. For more information on obtaining a region ID, see Regions and endpoints.