2016-06-17 214 views
1

我在vmware播放器上使用ubuntu 16.04。共享文件夾已啓用,並在/ mnt/fghs中可見。但是,所有者(root)不能被chown改變。如何改變它?請告訴我。如何更改vmware共享文件夾的權限

此外,有人說修改/ etc/fstab後可以更改所有者。但是,我無法在/ etc/fstab中找到任何信息,如.host://mnt/hgfs vmhgfs defaults 0 0.當我將該行添加到/ etc/fstab文件中時,wmware無法啓動。

+0

已解決。我想這個問題是因爲vmware工具版本。 – Jang

回答

0

您可以嘗試those steps

sudo su 
touch /bin/remount_hgfs 
chmod a+x /bin/remount_hgfs 
echo '#!/bin/sh -e' >> /bin/remount_hgfs 
echo 'umount /mnt/hgfs' >> /bin/remount_hgfs 
echo 'mount /mnt/hgfs' >> /bin/remount_hgfs 
echo '.host:/ /mnt/hgfs vmhgfs rw,ttl=1,uid=33,gid=33,nobootwait 0 0' >> /etc/fstab 
line=`wc -l /etc/rc.local | cut -f1 -d' '`; sed -i "${line}ish /bin/remount_hgfs" /etc/rc.local 
reboot 
3

可能有點晚,但無論如何。

首先,卸載你的共享文件夾:

sudo umount /mnt/hgfs 

然後運行:

vmhgfs-fuse .host:/ /mnt/hgfs -o uid=1000 -o gid=1000 -o umask=0033 

,你應該考慮改變uidgid到你。請記住:

id -u 
id -g 

將返回您當前的用戶和組ID。

查看更多選項vmhgfs-fuse --help;)

+0

'vmhgfs-fuse .host:/ vmware-share-folder-name/myMountLocation -o uid = 1000 -o gid = 1000'爲我工作。沒有umask,它只是將所有東西都設置爲777。 – etech