Opened 16 years ago
Closed 16 years ago
#4771 closed defect (fixed)
Truncating files does not work on shared folders (Linux guest) => Fixed in SVN/3.0.8
Reported by: | Martin | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 3.0.6 |
Keywords: | truncate | Cc: | |
Guest type: | Linux | Host type: | other |
Description
Host: Vista Guest: Ubuntu9 Vbox 3.0.2
The below c program fails to truncate fails if the file is on a shared folder The program runs on the guest, so the file is actually a file on the vista host.
- The program works fine, if the file is *not* on a shared folder.
- The program does not works, if the file *is* on a shared folder.
- I can compile it with or without O_EXCL => makes no difference. I did also run the resulting exe as root to be sure.
- The file is found and open did succeed (f has a positive value, usually 3)
- ftruncate also returns success (zero)
this is somewhat similar to bug 2257 (except that piping shorter/empty text (or dev/null) into the file actually works
#include <stdio.h> #include <fcntl.h> int main() {
int f = open("/mnt/share/text", O_WRONLY); | O_EXCL ); printf("%d", f); ftruncate(f, 0); close(f);
}
Change History (4)
comment:1 by , 16 years ago
comment:3 by , 16 years ago
Host type: | Windows → other |
---|---|
Summary: | truncate files does not work on shared folder (3.0.2) host Vista / guest ubuntu → Truncating files does not work on shared folders (Linux guest) => Fixed in SVN |
Version: | VirtualBox 3.0.2 → VirtualBox 3.0.6 |
No, this bug is not related to #3712. Actually this bug was just fixed in SVN and the fix will be part of the next maintenance release. This was a bug (missing case) in the Linux guest additions so make sure to update the additions to verify the fix.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | Truncating files does not work on shared folders (Linux guest) => Fixed in SVN → Truncating files does not work on shared folders (Linux guest) => Fixed in SVN/3.0.8 |
Create something ate the linebreaks ...
#include <stdio.h>
#include <fcntl.h>
int main() {
}