0026-00000011

更新时间:
复制 MD 格式

Problem description

You cannot access a symbolic link that points to another symbolic link.

Cause

This error occurs when you try to access a symbolic link whose target file is also a symbolic link.

Sample problems

For example, you send the following request:

GET /link-to-link HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 02 Jan 2019 13:28:38 GMT
Authorization: OSS qn6q**************:77Dv****************

If the `link-to-link` object in the request is a symbolic link and its target file is also a symbolic link, this error is returned.

Solution

You can use the GetSymlink operation to view the target path of a symbolic link. For example:

GET /link-to-link?symlink HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 02 Jan 2019 13:28:38 GMT
Authorization: OSS qn6q**************:77Dv****************

The following is a sample response:

HTTP/1.1 200 OK
Server: AliyunOSS
Date: Wed, 02 Jan 2019 13:28:38 GMT
Last-Modified: Wed, 01 Jan 2019 13:28:38 GMT
Content-Length: 0
Connection: keep-alive
x-oss-request-id: 5650BD7****FB30443962F9A
x-oss-symlink-target: link-to-jpg
ETag: "A797938C31D59EDD08D86188F6D5****"

The x-oss-symlink-target field indicates that the target of the `link-to-link` symbolic link is `link-to-jpg`. Run the GetSymlink operation to view the target path of `link-to-jpg`:

GET /link-to-jpg?symlink HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 02 Jan 2019 13:28:38 GMT
Authorization: OSS qn6q**************:77Dv****************

If you receive the following request:

HTTP/1.1 200 OK
Server: AliyunOSS
Date: Wed, 02 Jan 2019 13:28:38 GMT
Last-Modified: Wed, 01 Jan 2019 13:28:38 GMT
Content-Length: 0
Connection: keep-alive
x-oss-request-id: 5650BD7****FB30443962F9A
x-oss-symlink-target: oss.jpg
ETag: "A797938C31D59EDD08D86188F6D5****"

The response shows that `link-to-jpg` is a symbolic link that points to `oss.jpg`. In this example, `link-to-link` is a symbolic link that points to another symbolic link. Requests such as GetObject or HeadObject for this type of symbolic link will return an error. Therefore, ensure that the symbolic link you access does not point to another symbolic link.

References