VirtualBox

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 Frank Mehnert)

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 Frank Mehnert, 16 years ago

Host type: otherLinux

comment:2 by Frank Mehnert, 16 years ago

Component: othershared folders

comment:3 by Andrew, 15 years ago

I acknowledge this bug and propose it being fixed.

Is there a quickfix?

comment:4 by Dimas Souza, 15 years ago

I acknowledge this bug also and propose it being fixed.

Is there a workaround?

comment:5 by Dimas Souza, 15 years ago

btw: I am using VirtualBox 2.1.2r41885

comment:6 by Dimas Souza, 15 years ago

More info: When creating directories, the permissions are bein correctly created.

comment:7 by pt, 15 years ago

omg i am retarded

comment:8 by P. Meiser, 15 years ago

I would also be interested in a solution.

by Marc Schütz, 15 years ago

Attachment: vbox-umask.patch added

comment:9 by Marc Schütz, 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.

in reply to:  description comment:10 by Matt Kynx, 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:11 by P. Meiser, 15 years ago

Issue is also present in 2.2.0 beta2.

comment:12 by Frank Mehnert, 15 years ago

Summary: VirtualBox disrespects umask when creating files in shared foldersVirtualBox 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:13 by P. Meiser, 15 years ago

works perfectly in 2.2.0. From my POV, this ticket can be closed.

comment:14 by Sander van Leeuwen, 15 years ago

Resolution: fixed
Status: newclosed

comment:15 by P. Meiser, 15 years ago

Resolution: fixed
Status: closedreopened

Issue is there again with 3.0.0.

comment:16 by umoeller, 15 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in 3.0.2.

comment:17 by pepijnve, 14 years ago

Resolution: fixed
Status: closedreopened

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 P. Meiser, 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 Marc Schütz, 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:20 by Frank Mehnert, 14 years ago

To be sure: Which was the last working VBox release for you?

comment:21 by Marc Schütz, 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 Frank Mehnert, 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:23 by Marc Schütz, 14 years ago

This bug is still there in version 3.2.6.

comment:24 by Frank Mehnert, 14 years ago

Well, if you don't answer my question I cannot help you.

comment:25 by Marc Schütz, 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:26 by Marc Schütz, 13 years ago

This bug is still present in 4.0.8.

comment:27 by Jordi, 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 Frank Mehnert, 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.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use