VirtualBox

Ticket #4890 (reopened defect)

Opened 5 years ago

Last modified 8 months ago

Linux guest, "mv -f file1 file2" fails on shared folder without write permissions on file2 (Windows hosts)

Reported by: 2GooD Owned by:
Priority: major Component: shared folders
Version: VirtualBox 3.2.10 Keywords:
Cc: Guest type: Linux
Host type: Windows

Description

Test case:

touch file1 file2 chmod a-w file2 mv -f file1 file2

On the guest disk, there is no message whatsoever and file2 is replaced by file1. This is the behavior I expect.

On a shared folder pointing to a directory on the host's local hard disk drive, I get this error from the mv command and file1 remains:

mv: cannot move file1' to file2': Operation not permitted

When the shared folder is pointing to a network drive, I get this error from the mv command and file1 remains:

mv: cannot move file1' to file2': File exists

Change History

comment:1 Changed 5 years ago by 2GooD

Sorry for the formatting above. Here is the test case with correct newlines:

touch file1 file2
chmod a-w file2
mv -f file1 file2

comment:2 Changed 4 years ago by frank

  • Summary changed from WinXP host, Ubuntu 9.04 guest, "mv -f file1 file2" fails on shared folder without write permissions on file2 to Linux guest, "mv -f file1 file2" fails on shared folder without write permissions on file2 => Fixed in SVN

Fixed in the next release.

comment:3 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 3.1.8

comment:4 Changed 4 years ago by poisson

  • Status changed from closed to reopened
  • Resolution fixed deleted

I don't believe this has actually been fixed.

  • Host: Win 7 (32b)
  • Guest: Ubuntu 10.04 (tried both 64b and 32b)
  • Guest/Vbox version: tried 3.2.8 and 3.2.10
root@keira-u64:/www/tmp# touch file1
root@keira-u64:/www/tmp# ll
total 16
drwxrwxrwx 1 poisson poisson     0 2010-10-16 09:05 ./
dr-xr-xr-x 1 poisson poisson 16384 2010-10-11 20:13 ../
-rwxrwxrwx 1 poisson poisson     0 2010-10-16 09:04 file1*
root@keira-u64:/www/tmp# chmod a-w file1
root@keira-u64:/www/tmp# ll
total 16
drwxrwxrwx 1 poisson poisson     0 2010-10-16 09:05 ./
dr-xr-xr-x 1 poisson poisson 16384 2010-10-11 20:13 ../
-r-xr-xr-x 1 poisson poisson     0 2010-10-16 09:04 file1*
root@keira-u64:/www/tmp# rm -f file1
rm: cannot remove `file1': Operation not permitted
root@keira-u64:/www/tmp# chmod a+w file1
root@keira-u64:/www/tmp# rm -f file1
root@keira-u64:/www/tmp# ll
total 16
drwxrwxrwx 1 poisson poisson     0 2010-10-16 09:06 ./
dr-xr-xr-x 1 poisson poisson 16384 2010-10-11 20:13 ../
root@keira-u64:/www/tmp#

Mounted as: /www on /www type vboxsf (uid=1000,gid=1000,rw)

comment:5 Changed 4 years ago by frank

  • Version changed from VirtualBox 3.0.4 to VirtualBox 3.2.10
  • Summary changed from Linux guest, "mv -f file1 file2" fails on shared folder without write permissions on file2 => Fixed in SVN to Linux guest, "mv -f file1 file2" fails on shared folder without write permissions on file2 (Windows hosts)

Right, this was actually fixed for Linux hosts but not for Windows hosts. In contrast to Linux where a file can be removed if the directory is writable but the file itself is read-only, a read-only file cannot be removed on Windows.

comment:6 Changed 4 years ago by poisson

Thanks. Could it perhaps be fixed so that the driver would automatically add the write permission prior to the deletion?

comment:7 Changed 4 years ago by vbuser

Can the priority of fixing this problem be increased? The solution suggested by "poisson" should resolve this and many other issues related to the difference between how Windows and Linux handle a "move" to an existing file that is set to read-only. A Linux guest cannot successfully access a Subversion shared folder on a Windows host due to this problem. See  http://forums.virtualbox.org/viewtopic.php?f=6&t=3201&start=15 and  http://forums.virtualbox.org/viewtopic.php?f=3&t=22048 and  http://forums.virtualbox.org/viewtopic.php?f=1&t=29406 ...

comment:8 Changed 4 years ago by frank

  • Priority changed from minor to major

comment:10 Changed 3 years ago by mszulc

Bug still exist in 4.0.6 (Host: Windows SP3 (x86) with all updates; Guest: Ubuntu 10.10 x86 with all updates and Guest Additions 4.0.6):

mateusz@arizona-virtual ~ $ sudo mount -t vboxsf D_DRIVE dyskd
[sudo] password for mateusz: 
mateusz@arizona-virtual ~ $ cd dyskd 
mateusz@arizona-virtual ~/dyskd $ touch file1 file2 
mateusz@arizona-virtual ~/dyskd $ chmod a-w file2 
mateusz@arizona-virtual ~/dyskd $ mv -f file1 file2 
mv: cannot move file1' to file2': Operation not permitted

This is particulary annoying when working with SVN (subversion) client:

mateusz@arizona-virtual ~/dyskd/project_svn $ svn update 
svn: Can't move '.svn/tmp/entries' to '.svn/entries': Operation not permitted

comment:11 Changed 3 years ago by ostroffjh

Still exists in 4.0.8 (Host: Windows Vista) (Guest Ubuntu 10.10) I also ran into this with svn - is there any workaround, or am I just unable to use svn? (I'm getting "file exists" rather than "operation not permitted" but it appears to be the same issue.

comment:12 Changed 3 years ago by stagas

The bug still exists in v4.1.4 tested with 64bit Windows 7 host and 64bit Ubuntu 11.10 guest.

comment:13 Changed 17 months ago by astronaute

Still exist in 4.2.4 on windows 7 64bit...

Will this ever be fixed?

comment:14 Changed 13 months ago by henriqueutsch

I have the same problem, and no fixed this bug. My VB version is 4.2.10. I am disappointed. Im 4 years ago no fixed this problem.

Last edited 13 months ago by henriqueutsch (previous) (diff)

comment:15 Changed 8 months ago by rewen

Same problem still exists in 4.2.16 on Win7 x64.

Extremely frustrating. I have no valid workarounds at the moment.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use