Applicable Products
QTS 5.2.0 and above, QuTS hero 5.2.0 and above
Root Cause
When performing certain file actions on a symbolic link (for example copy, move, download, compress), the system will check that you have sufficient permissions to perform the action on both the symbolic link and on the file/folder the symbolic link is pointing to. If you do not have sufficient permissions on either the symbolic link or the linked file/folder, you will not be able to perform the action. You might also receive a "permission denied" error message.
What is a symbolic link?
- A symbolic link is a special type of file that references another file or folder.
- Symbolic links are similar to shortcuts on other operating systems, they allow you to create multiple file paths that link to a single file or folder without the need to physically copy the file or folder.
- Symbolic links are an advanced feature of QNAP operating systems and can only be created via SSH.
Determining permissions for symbolic links
To perform a particular file action (open,edit, copy,compress,etc.) on a symbolic link, the following are required:
- The file/folder linked to by the symbolic link must be a valid file path. Additionally, the following paths are also valid paths for targets of symbolic links:
- Paths listed in /etc/config/smb.conf under the section "PATH"
- Paths defined by Ubuntu Linux Station
- Paths defined by Snapshot and Snapshot Vault
- Paths of remote mounts
- /share/external/.nd
- /share/external/.cm
- /share/external/.cr
- You must have sufficient permission to perform the same file action on the linked file/folder.
For example, if a symbolic link references the file "myfile.doc", and you do not have write permission on "myfile.doc", then you do not have write permission on the symbolic link.
Example Scenario
The following is an example scenario where a file action on a symbolic link may be denied because the user does not have sufficient permissions on the linked file/folder.
The application Plex Media Server creates and uses symbolic links as part of its normal operation. If you create a shard folder on your system and restart Plex Media Server, then Plex Media Server will automatically create the symbolic folder link "Plex Media Server" in your shared folder. If you try to compress this symbolic link in File Station, you will receive the error "Unable to perform this action. You do not have enough permissions, or this folder is read-only". In this case, you cannot compress the symbolic folder link "Plex Media Server" because you do not have permission to compress the folder that "Plex Media Server" links to.
适用产品
QTS 5.2.0及以上,QuTS hero 5.2.0及以上
根本原因
在对符号链接执行某些文件操作(例如复制、移动、下载、压缩)时,系统会检查您是否有足够的权限对符号链接和符号链接指向的文件/文件夹执行操作。如果您在符号链接或链接的文件/文件夹上没有足够的权限,您将无法执行该操作。您可能还会收到“权限被拒绝”的错误消息。
什么是符号链接?
- 符号链接是一种特殊类型的文件,它引用另一个文件或文件夹。
- 符号链接类似于其他操作系统上的快捷方式,它们允许您创建多个文件路径链接到单个文件或文件夹,而无需物理复制文件或文件夹。
- 符号链接是QNAP操作系统的高级功能,只能通过SSH创建。
确定符号链接的权限
要对符号链接执行特定的文件操作(打开、编辑、复制、压缩等),需要满足以下条件:
- 符号链接所链接的文件/文件夹必须是有效的文件路径。此外,以下路径也是符号链接目标的有效路径:
- /etc/config/smb.conf中“PATH”部分列出的路径
- Ubuntu Linux 工作站定义的路径
- 快照和快照Vault定义的路径
- 远程挂载的路径
- /share/external/.nd
- /share/external/.cm
- /share/external/.cr
- 您必须有足够的权限对链接的文件/文件夹执行相同的文件操作。
例如,如果符号链接引用文件“myfile.doc”,而您对“myfile.doc”没有写权限,那么您对符号链接也没有写权限。
示例场景
以下是一个示例场景,其中由于用户对链接的文件/文件夹没有足够的权限,文件操作可能被拒绝。
应用程序Plex Media Server在其正常操作过程中会创建和使用符号链接。如果您在系统上创建一个共享文件夹并重新启动Plex Media Server,那么Plex Media Server会自动在您的共享文件夹中创建符号文件夹链接“Plex Media Server”。如果您尝试在 File Station 中压缩此符号链接,您将收到错误消息“无法执行此操作。您没有足够的权限,或者此文件夹是只读的”。在这种情况下,您无法压缩符号文件夹链接“Plex Media Server”,因为您没有权限压缩“Plex Media Server”链接到的文件夹。