VirtualBox

Ticket #6512 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: foobar42 Owned by:
Priority: major 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

vbox.sf.sol.panic.patch Download (1000 bytes) - added by foobar42 4 years ago.
Add missing parameters to panic() calls.
vbox.sf.sol.getattr.patch Download (1.6 KB) - added by foobar42 4 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 Download (544 bytes) - added by foobar42 4 years ago.
Use correct declaration on Solaris 10 for fop_inactive function.
vbox.sf.sol.create.patch Download (1.2 KB) - added by foobar42 4 years ago.
Honor the requested file mode when creating files.
vbox.sf.sol.setattr.patch Download (7.9 KB) - added by foobar42 4 years ago.
Added support for setting file attributes (times and mode) and file-length.

Change History

Changed 4 years ago by foobar42

Add missing parameters to panic() calls.

Changed 4 years ago by foobar42

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

comment:1 Changed 4 years ago by foobar42

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).

Changed 4 years ago by foobar42

Use correct declaration on Solaris 10 for fop_inactive function.

comment:2 Changed 4 years ago by foobar42

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.

Changed 4 years ago by foobar42

Honor the requested file mode when creating files.

comment:3 Changed 4 years ago by foobar42

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 Changed 4 years ago by scott_barrett

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)?

Changed 4 years ago by foobar42

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

comment:5 Changed 4 years ago by foobar42

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 Changed 4 years ago by ramshankar

  • Summary changed from Can't set file times or permissions from within Solaris guest on files in shared folder to Can'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 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use