AzureStorageExplorer icon indicating copy to clipboard operation
AzureStorageExplorer copied to clipboard

NFS preserve symlinks

Open craxal opened this issue 4 months ago • 9 comments

craxal avatar Nov 18 '25 01:11 craxal

@v-xianya Feature work has been merged. Feel free to verify. Please note that, due to a bug in AzCopy, downloaded symlinks will appear broken, as the link text is percent encoded. AzCopy is working on a fix that decodes link text on download (see #8844).

craxal avatar Nov 22 '25 00:11 craxal

Hi @craxal I verified this issue on the latest build 20251126.2

I created a local directory that contains two items: a normal file and a symlink pointing to that file.

mkdir test-symlinks
cd test-symlinks
echo "hello" > file.txt
ln -s file.txt link-to-file

After uploading this directory to the NFS file share, only the normal file file.txt appears in the uploaded folder. Does this mean the symlink was not preserved?

Image

v-xianya avatar Nov 26 '25 11:11 v-xianya

@v-xianya I don't think you used the command correctly. You're supposed to navigate to the location where the link is to be created, then specify the source of the link.

So, you should change your commands to this:

mkdir test-symlinks
cd test-symlinks
echo "hello" > file.txt
mkdir links
cd links
ln -s ../file.txt

craxal avatar Dec 03 '25 18:12 craxal

@craxal On the new build 20251204.1. Followed the updated commands, but the symlink does not appear in the NFS file share after uploading the test-symlinks directory.

Image

However, when uploading the same directory to an SMB file share or a blob container, the symlink is displayed as a normal file instead of being preserved as a symbolic link.

Image

v-xianya avatar Dec 04 '25 03:12 v-xianya

@v-xianya Have you enabled the Preserve Symlinks setting before uploading?

craxal avatar Dec 04 '25 22:12 craxal

@craxal "There is no 'Preserve Symlinks' setting in Storage Explorer. I tried uploading the directory using AzCopy with the --preserve-symlinks flag, but it indicated that the file share does not support preserving symlinks."

v-xianya avatar Dec 05 '25 08:12 v-xianya

@v-xianya Oh, my mistake. Those changes haven't been merged yet. I'll let you know when they are.

Keep in mind symbolic links are only supported for NFS shares.

craxal avatar Dec 05 '25 17:12 craxal

@craxal Verified this issue on the new build 20251210.2 with setting 'Preserve Symbolic Links' enabled.

When uploading a symbolic link to an NFS file share, the symlink appears as a normal file in the share. However, after downloading it, it looks like this. Is this expected?

Image

v-xianya avatar Dec 10 '25 06:12 v-xianya

@v-xianya Yes, that is expected. As I mentioned above, due to a bug in AzCopy, downloaded symlinks will appear broken, as the link text is percent encoded. AzCopy is working on a fix that decodes link text on download (see https://github.com/microsoft/AzureStorageExplorer/issues/8844).

We'll keep this bug open for tracking purposes.

craxal avatar Dec 10 '25 19:12 craxal