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 Station によって定義されたパス
- スナップショットおよびスナップショット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」というシンボリックフォルダリンクを圧縮することはできません。