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”所連線的資料夾。