VMware Cloud Community
yeujik
Contributor
Contributor

shared folder & unix filesystem rights

Hi,

I configure a RedHat 5 guest (same problem with Fedora7) to share a folder with my windows XP host (workstation 5.5). Does anyone know how can I configure filesystem permissions on this share ?

I need to give full read/write access to a group of users in the linux guest. At this time, I am not able to delete files on this share (even if I am root). Did I miss some config or is it a security feature ?

Regards,

Reply
0 Kudos
10 Replies
mcocat
Enthusiast
Enthusiast

Are you accessing the folder via a CIFS share? If so, the user you use to authenticate when mounting the share will be the determining factor as to if you have access to modify files. Also, when you mounted the file, did you mount it read only or read/write?

Reply
0 Kudos
yeujik
Contributor
Contributor

Sory, my fault, I didn't specify this.

This is a "vmware shared folder". I created it in the workstation gui (VM Settings -> Options -> Shared Folder). It is mounted under /mnt/hgfs/xxx. Mounted I guess by vmware tools. Owner is set to root/root. Any user can write in it but none can delete (including root!).

I don't know how to configure this.

Thanks.

Reply
0 Kudos
mcocat
Enthusiast
Enthusiast

I just verified this with both Red Hat 4 and Red Hat 5. For both systems I enabled a local share on my Workstation host to the VM. The share was configured as Enabled and the "Read-only" option was not checked. VMware tools does automatically mount the share. I was able to write, modify and delete all files from the VM. It sounds like your issue is probably related to the Windows security permissions. Start by checking that or by creating a new folder where everyone has full permission. Point VMware workstation to the new share and reboot the VM or restart the VMware-tools service.

Is this a networked or local folder?

From the vm, run: ls -al /mnt/hgfs/

yeujik
Contributor
Contributor

I use both, networked & local folder. For the deleting problem, you are right, it is a windows permission matter.

Do you know how can I change owner and permission to this share in the guest (linux) OS?

Thanks for your help,

Reply
0 Kudos
mcocat
Enthusiast
Enthusiast

Doing a search I found this: (source: http://communities.vmware.com/thread/106145)

You can tell Linux the user and group IDs to use for the files in the filesystem by editing the options field in /etc/fstab. For example:

  1. Beginning of the block added by the VMware software

.host:/ /mnt/hgfs vmhgfs defaults,ttl=5,uid=1000,gid=1000 0 0

  1. End of the block added by the VMware software

-robind

Reply
0 Kudos
yeujik
Contributor
Contributor

I cannot see such a config in my /etc/fstab. Is there any other way for vmware toolsto mount this share?

Reply
0 Kudos
mcocat
Enthusiast
Enthusiast

can you post the contents of your /etc/fstab?

Reply
0 Kudos
yeujik
Contributor
Contributor

LABEL=/ / ext3 defaults 1 1

devpts /dev/pts devpts gid=5,mode=620 0 0

tmpfs /dev/shm tmpfs defaults 0 0

proc /proc proc defaults 0 0

sysfs /sys sysfs defaults 0 0

LABEL=SWAP-sda2 swap swap defaults 0 0

Reply
0 Kudos
mcocat
Enthusiast
Enthusiast

Hmmm, that's strange. I am not sure how else vmware would mount the partition. Maybe someone else can chime in.

Reply
0 Kudos
AWo
Immortal
Immortal

I recommend not to use the shared folders option but to use samba instead. This is faster and the permission conversion is clear. To keep this running even if there's no physical LAN connection add a "host-only" NIC to you guest, if appropriate.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos