Page 1 of 1

Ubuntu guest: chmod -w in shared folder

Posted: 25. Jan 2013, 19:55
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?

Re: Ubuntu guest: chmod -w in shared folder

Posted: 25. Jan 2013, 20:35
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?

Re: Ubuntu guest: chmod -w in shared folder

Posted: 25. Jan 2013, 20:43
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.