Ubuntu guest: chmod -w in shared folder

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Groboclown
Posts: 2
Joined: 25. Jan 2013, 19:44
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xubuntu

Ubuntu guest: chmod -w in shared folder

Post by Groboclown »

EDIT: updated to reference "shared folder" instead of "shared drive"

I'm using Xubuntu 12.10 desktop as a guest OS on VirtualBox v4.2.6r82870. I've been able to mount a shared folder just fine with an /etc/fstab entry:

Shared /media/shared vboxsf uid=1000,gid=1000,rw,auto 0 0

I've ensured my user (uid=1000) is part of the vboxsf group. I also verified that my Windows login user has full control over the shared folder. I can perform most operations without issue in the shared folder. However, when I run a chmod command, I see very strange results:

Code: Select all

$ touch x
$ ls -lA x
rwxrwxrwx 1 me me 0 Jan 25 11:49 x
$ chmod -w x
chmod: x: new permissions are r-xr-xrwx, not r-xr-xr-x
$ ls -lA x
rwxrwxrwx 1 me me 0 Jan 25 11:49 x
When I look at the new file ("x") under Windows, it does not have the Read-only flag set. If I explicitly set that in Windows, now the shared folder in Xubuntu works like this:

Code: Select all

$ ls -lA x
r-xr-xr-x 1 me me 0 Jan 25 11:49 x
$ chmod +w x
$ ls -lA x
rwxrwxrwx 1 me me 0 Jan 25 11:49 x
And, under Windows, the file correctly no longer has the Read-only flag set. Trying the original route again (chmod -w) still shows the bad behavior.

The bug database doesn't seem to have any entries on this. Does anyone have any way to work around this?
Last edited by Groboclown on 25. Jan 2013, 20:41, edited 1 time in total.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Ubuntu guest: chmod -w in shared folder

Post by noteirak »

You talk about shared drive, and in your title about share folder.

What are you talking about exactly?
A windows share? a NFS share? a Shared folder from Virtualbox? something else?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Groboclown
Posts: 2
Joined: 25. Jan 2013, 19:44
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xubuntu

Re: Ubuntu guest: chmod -w in shared folder

Post by Groboclown »

noteirak wrote:You talk about shared drive, and in your title about share folder.

What are you talking about exactly?
A windows share? a NFS share? a Shared folder from Virtualbox? something else?
Ah, thanks for noticing that. I've fixed the original post to use "shared folder" instead of "shared drive". This is a VirtualBox shared folder mounted through the Guest Additions under the "vboxsf" file system type.
Post Reply