You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何更改VMware共享文件夹挂载点?软链接权限问题求助

Hey István, I’ve run into this exact scenario before—let’s get this sorted out for you. The root of the problem is usually either how the shared folder is mounted (lacking user permissions) or misunderstanding how symlink permissions work. Here are three reliable solutions:

1. Mount the Shared Folder Directly to Your Target Location (Best Practice)

Instead of using a symlink, configure VMware to mount the shared folder straight to your desired path. This avoids permission headaches entirely:

  • First, unmount the existing shared folder if it’s already mounted:
    sudo umount /mnt/hgfs  # Adjust this path to your current vmhgfs mount point
    
  • Create your target directory (replace /path/to/your/target with your actual desired location):
    sudo mkdir -p /path/to/your/target
    
  • Edit the /etc/fstab file to add a permanent mount entry:
    sudo nano /etc/fstab
    
    Add this line at the end (replace shared_folder_name with your VMware shared folder name, and 1000 with your user’s UID/GID—find these with the id command):
    vmhgfs-fuse .host:/shared_folder_name /path/to/your/target fuse defaults,allow_other,uid=1000,gid=1000 0 0
    
  • Save and exit nano (Ctrl+O, Enter, Ctrl+X), then mount the folder immediately:
    sudo mount /path/to/your/target
    

Symlinks themselves have minimal permission impact—what matters is the permissions of the target directory they point to. But if your symlink is owned by root and you want to adjust that:

  • Use the -h flag with chown to modify the symlink’s owner (not the linked folder):
    sudo chown -h your_username:your_group /path/to/your/symlink
    
  • If you still can’t access the shared folder through the symlink, double-check that your original vmhgfs mount includes the allow_other parameter. Edit /etc/fstab and add allow_other to the mount options for the shared folder, then remount it.

A bind mount lets you mirror an existing mounted directory to another location, which acts like a symlink but behaves more like a direct mount:

  • Create your target directory:
    sudo mkdir -p /path/to/your/target
    
  • Set up the bind mount temporarily:
    sudo mount --bind /mnt/hgfs/shared_folder_name /path/to/your/target
    
  • To make it permanent, add this line to /etc/fstab:
    /mnt/hgfs/shared_folder_name /path/to/your/target none bind 0 0
    

Any of these methods should resolve your permission issues. The first option is the cleanest long-term solution since it eliminates the need for symlinks entirely.

内容的提问来源于stack exchange,提问作者István Radics

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:28:32