VirtualBox

Opened 14 years ago

Closed 14 years ago

#6512 closed defect (fixed)

Can't set file times or permissions from within Solaris guest on files in shared folder => fixed in SVN

Reported by: foobar42 Owned by:
Component: shared folders Version: VirtualBox 3.1.6
Keywords: Cc:
Guest type: Solaris Host type: Linux

Description

Linux host, running ext3/ext4 (same behaviour for both), Solaris 10u8 guest, mounted shared folder. If I use 'tar xpf' to unpack a tar I get

tar: can't set time on <file>: Operation not applicable
tar: warning - file permissions have changed for <file> (are 0100600, should be 0755)

and using 'gtar xpf' I get

gtar: <file>: Cannot utime: Operation not applicable
gtar: <file>: Cannot change mode to rwxr-xr-x: Operation not applicable

Running truss I see the same error for both:

<pid>:  futimesat(-3041965, "<file>", 0x08047A40) Err#89 ENOSYS
...
<pid>:  chmod("<file>", 0755)                     Err#89 ENOSYS

The tar/gtar completes, but with a non-zero exit code. And of course just running 'chmod' or 'touch' fails with ENOSYS too.

This makes all sorts of scripts and operations fail, rendering the shared folder pretty much unusable for anything except simple copying.

Attachments (5)

vbox.sf.sol.panic.patch (1000 bytes ) - added by foobar42 14 years ago.
Add missing parameters to panic() calls.
vbox.sf.sol.getattr.patch (1.6 KB ) - added by foobar42 14 years ago.
Fix/improve getattr. This adds missing gid and txt mode bits, and makes getattr report the file type properly.
vbox.sf.sol.inactive.patch (544 bytes ) - added by foobar42 14 years ago.
Use correct declaration on Solaris 10 for fop_inactive function.
vbox.sf.sol.create.patch (1.2 KB ) - added by foobar42 14 years ago.
Honor the requested file mode when creating files.
vbox.sf.sol.setattr.patch (7.9 KB ) - added by foobar42 14 years ago.
Added support for setting file attributes (times and mode) and file-length.

Download all attachments as: .zip

Change History (12)

by foobar42, 14 years ago

Attachment: vbox.sf.sol.panic.patch added

Add missing parameters to panic() calls.

by foobar42, 14 years ago

Attachment: vbox.sf.sol.getattr.patch added

Fix/improve getattr. This adds missing gid and txt mode bits, and makes getattr report the file type properly.

comment:1 by foobar42, 14 years ago

I've created and attached three patches, the 3rd one of which is the actual fix for this issue. I've put all three patches here as they're all related to the same code, and the second one is closely related to this issue - if you prefer I can create separate tickets. The patches are based on r30037.

I've tested this on both Solaris 10u8 and OpenSolaris 2009.06, but since this is my first Solaris kernel hacking it could do with some reviewing by somebody more knowledgeable here.

Note that setting permissions on directories still doesn't work because it's not implemented in vbsf:vbsfSetFileInfo (see the TODO in there).

by foobar42, 14 years ago

Attachment: vbox.sf.sol.inactive.patch added

Use correct declaration on Solaris 10 for fop_inactive function.

comment:2 by foobar42, 14 years ago

A couple more patches: the first one is directly related to this issue in that it ensures the files are created with the correct file-mode. The second is a minor function-signature fix.

by foobar42, 14 years ago

Attachment: vbox.sf.sol.create.patch added

Honor the requested file mode when creating files.

comment:3 by foobar42, 14 years ago

Updated the patch to set the mode for both files and directories, even though setting the mode on directories is not implemented yet (see above) - but this at least makes the solaris shared-folders ready for when it does get implemented.

comment:4 by Scott Barrett, 14 years ago

I'm also bitten by this in 3.2.4 running a Solaris 10 guest on a Mac OS X host. Any idea when an updated guest additions for this might be released (or made available for testing)?

by foobar42, 14 years ago

Attachment: vbox.sf.sol.setattr.patch added

Added support for setting file attributes (times and mode) and file-length.

comment:5 by foobar42, 14 years ago

Updated the setattr patch to fix a couple issues in the error handling:

  • fixed a small memory leak if vboxCallCreate() failed
  • fixed a descriptor leak if vboxCallCreate() was called on a non-existent file

Note: the order of the patches should be: 'panic', 'getattr', 'setattr', 'create', and 'inactive' (though 'panic' and 'inactive' can be applied in any order).

comment:6 by Ramshankar Venkataraman, 14 years ago

Summary: Can't set file times or permissions from within Solaris guest on files in shared folderCan't set file times or permissions from within Solaris guest on files in shared folder => fixed in SVN

The patches from foobar42 fixes this problem and should be part of the next release. Thank you for the report and the patches!

comment:7 by Frank Mehnert, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use