Opened 16 years ago
Last modified 5 years ago
#1260 closed defect
VirtualBox disrespects umask when creating files in shared folders => Fixed in SVN — at Version 28
Reported by: | László Monda | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 1.5.6 |
Keywords: | umask permission problem | Cc: | |
Guest type: | other | Host type: | Linux |
Description (last modified by )
I want my WinXP guest to create files using shared folders on the filesystem of my Gutsy host with the permission 644. I set umask to 0022, but VirtualBox creates files with permission 600.
I've even modified the VirtualBox script right before
exec "/usr/lib/virtualbox/VirtualBox" "$@"
to include
umask 0022
but VirtualBox obviously disrespects umask by creating files with permission 600.
Change History (29)
comment:1 by , 16 years ago
Host type: | other → Linux |
---|
comment:2 by , 16 years ago
Component: | other → shared folders |
---|
comment:3 by , 15 years ago
comment:4 by , 15 years ago
I acknowledge this bug also and propose it being fixed.
Is there a workaround?
comment:6 by , 15 years ago
More info: When creating directories, the permissions are bein correctly created.
by , 15 years ago
Attachment: | vbox-umask.patch added |
---|
comment:9 by , 15 years ago
The problem is that VirtualBox specifies a mode of 0600 when creating a file. This can be trivially fixed by using 0666 instead, which would then automatically be combined with the umask to yield 0644 (see the attached patch vbox-umask.patch).
However, I do not know the reason why 0600 has been used there in the first place.
comment:10 by , 15 years ago
This is a big one for me (OSX host, Linux guest). If I mount a group-writable directory, when users in that group create files they can't even read them!
I can understand it if the guest OS doesn't support the concept of a umask - perhaps then the solution would be to add a 'cmode' option to the mount command? But if OS does support umask wouldn't it make sense to honour it?
comment:12 by , 15 years ago
Summary: | VirtualBox disrespects umask when creating files in shared folders → VirtualBox disrespects umask when creating files in shared folders => Fixed in SVN |
---|
A simple fix will be contained in the upcoming release. The file permissions will be 0222 if the guest opened the file write-only, 0444 if the guest opened the file read-only and 0666 if the guest opened the file with read/write permissions.
comment:14 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:15 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Issue is there again with 3.0.0.
comment:17 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'm getting this behavior again in 3.1.6. getfacl output of all existing directories is
# file: Snapshots/ # owner: root # group: vboxusers # flags: -s- user::rwx group::rwx mask::rwx other::r-x default:user::rwx default:group::rwx default:mask::rwx default:other::r-x
However, newly created files get rw-------.
comment:18 by , 14 years ago
Same for me with 3.1.6, although all files have permission 666 instead of 644 (as my umask is 0022).
comment:19 by , 14 years ago
I can confirm this regression with 3.2.4. Btw, the permissions are correct when the file is created via Right Click -> New -> ... in Windows Explorer; but in Office (2007 here) it sets 666 instead of 644.
comment:21 by , 14 years ago
For me it was 3.1.4, but I did not test anything in between that version and the current one.
comment:22 by , 14 years ago
Works fine here when creating a file manually or saving a page from the internet explorer. Linux host, WinXP guest. Do you have some simpler test? Don't have Office available here...
comment:25 by , 14 years ago
No, I don't have a simpler test. But as you don't have office, I guess you still cannot help me.
comment:27 by , 12 years ago
This bug is still present in 4.1.18 and there's a similar ticket #10534
I wonder how such an important and basic issue keeps unsolved after 4 years!
comment:28 by , 12 years ago
Description: | modified (diff) |
---|
This bug has nothing to do with #10534. And if you would take some time and actually read the above comments then you would observe that there is no simple test case to reproduce the problem of this ticket.
I acknowledge this bug and propose it being fixed.