﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
18737	Linux guests: open(filename, O_CREAT|..., mode) fails inside shared folder => fixed in SVN/6.0.x x>10	jamesba	BP	"The following C code produces a simple executable which will attempt to create and open a read only test file in a single operation.

Expected behaviour when run:
* A newly created file called test.txt is created on disk with read only permissions
* A read-write file-handle for the file is returned by the open call

{{{
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>

int main() {
  int fd = open(""test.txt"", O_CREAT | O_EXCL | O_RDWR, 0444);

  if (fd < 0) {
    perror(""Could not create file: "");
    return -fd;
  }

  return 0;
}
}}}

When run on other file systems this works correctly but when run on a virtualbox shared folder the file is created correctly but the program exits with the error message:

{{{
Could not create file: : Permission denied
}}}

This can be bypassed by running the command with sudo, in which case it succeeds normally.

This is not a purely hypothetical problem, since the same error occurs when attempting to use any programme that makes this system call, such as a git clone."	defect	closed	shared folders	VirtualBox 6.0.8	fixed	file create shared permissions		Linux	Linux
