Shared folder file permissions - changed in 3.0.4?

Discussions about using Linux guests in VirtualBox.

Re: Shared folder file permissions - changed in 3.0.4?

Postby sagemintblue » 3. Oct 2009, 08:13

I'm having the same trouble it seems..

VBox: 3.0.6
Host: Win7 RC 64
Guest: Ubuntu 9.04 64
Mount line: sudo mount -t vboxsf -o rw,exec,uid=1000,gid=1000 projects /mnt/projects
Subversion: 1.6.5

When I try to perform a checkout or update with the svn client I run into a permissions error on a file move operation:

Code: Select all   Expand viewCollapse view
svn: Can't move '.svn/tmp/entries' to '.svn/entries': Operation not permitted
$ ls -l .svn/entries
-r-xr-xr-x 1 user user 156 2009-10-03 01:40 .svn/entries


It seems as though the APR library which the svn client uses for file related operations may be assuming too much about the underlying filesystem's capabilities:

http://subversion.tigris.org/ds/viewMes ... geId=81629

alan.wood@clear.net.nz wrote:
Hi
I have been looking at svn and samba recently, but only with the windows client.
There are comments in the windows versions of apr_file_rename() regarding not
being able to rename when the destination file is R/O on windows, you can do this on
unix. The problem is probably in this area where the apr routines on a unix client
expect the rename() library call to be able to rename over a read-only file irrespective
of the file system referenced.


Yes, that is correct. The Windows (and IIRC Cygwin) code path explicitly
resets the read-only flag on a file before attempting a rename. The Unix
code path does not. This implies that, if your working copy is on a
mounted volume shared from a Windows server, things will most likely
break horribly.

-- Brane


So any thoughts on how to avoid this problem within vboxvfs? There seems to be a Samba solution in the linked thread..
sagemintblue
 
Posts: 6
Joined: 3. Oct 2009, 07:25
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 9.0.4 64bit

Re: Shared folder file permissions - changed in 3.0.4?

Postby Syntaxeus » 5. Apr 2010, 12:11

I have too this very same problem, and found no solution for it.
I tried using the
Code: Select all   Expand viewCollapse view
chattr -i

command on the .svn folder, but then I get the
Code: Select all   Expand viewCollapse view
Inappropriate "ioctl" for device while reading flags
Syntaxeus
 
Posts: 5
Joined: 26. Dec 2009, 21:14
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Arch Linux 64-bit

Re: Shared folder file permissions - changed in 3.0.4?

Postby marckarasek » 29. Apr 2010, 17:55

Has there been any resolution on this issue?

I am running into the same problem with Win 7 Host and a Fedora 10 Client.

:?:
marckarasek
 
Posts: 1
Joined: 29. Apr 2010, 17:53
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Fedora 10

Re: Shared folder file permissions - changed in 3.0.4?

Postby SePPeR » 15. Jun 2010, 11:59

I'm having the same problem with Ubuntu Server as Guest OS.

Any solution?
SePPeR
 
Posts: 1
Joined: 15. Jun 2010, 11:56
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu Server

Re: Shared folder file permissions - changed in 3.0.4?

Postby Sasquatch » 15. Jun 2010, 20:55

I just did a checkout with the SVN client on my compile VM (running Ubuntu 8.10) and I had no problems finishing it. It checked out to my shared folder, mounted as follows:
Code: Select all   Expand viewCollapse view
sudo mount -t vboxsf -o uid=1000,gid=1000,rw,exec data /hosts/data

Running svn co <url to trunk> gave no issues whatsoever. All files are rw for me, then r--r-- (group, other).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Shared folder file permissions - changed in 3.0.4?

Postby cyspotts » 24. Jun 2010, 20:08

I am having the exact the problems as many of the previous posters. When I try and checkout with svn, I get the same error as mentioned above.

I mounted with the following command:

mount -t vboxsf -o uid=1000,gid=1000,rw,exec,dmode=0755 mydocs /mydocs

and am running a fedora guest

Any suggestions would be helpful
cyspotts
 
Posts: 1
Joined: 24. Jun 2010, 19:11
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Fedora

Re: Shared folder file permissions - changed in 3.0.4?

Postby Sasquatch » 24. Jun 2010, 21:17

Tried it without 'dmode=755'?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Shared folder file permissions - changed in 3.0.4?

Postby grichards » 4. Jul 2010, 21:17

Hello.

Host: Win7 64bit
Guest: CentOS5.5 32bit

I am having similar trouble.

After mounting as recommended in this thread (-o uid=xxx,gid=xxx,rw), all files and folders report 777 for user, group, world, except for .svn/entries and .svn/dir-prop-base which reports 555.

In other, but I think related trouble, file permission change behavior is just odd all around.

There is no way to remove the executable bit from the files and folder. The only possible modes are 777 or 555. I cannot change a file permission to 644 for instance. 777 reports instead.
grichards
 
Posts: 1
Joined: 4. Jul 2010, 21:05
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: centos

Re: Shared folder file permissions - changed in 3.0.4?

Postby Sasquatch » 4. Jul 2010, 22:04

File and directory permission bits with VB's SF are the same idea as with any other non-Linux FS (like NTFS): it's done in the mount options. I can't chmod a file on my NTFS partition to change it from 644 to 755 for example. I have to remount the NTFS partition and include the 'exec' option.

Because of this way, it's very odd that a new file or folder would not inherit these permissions. As I posted before (either here or in a different topic), a check-out of SVN did NOT change anything for it's permissions nor cause an error.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Shared folder file permissions - changed in 3.0.4?

Postby olegych » 24. Feb 2011, 11:54

Sasquatch wrote:File and directory permission bits with VB's SF are the same idea as with any other non-Linux FS (like NTFS): it's done in the mount options. I can't chmod a file on my NTFS partition to change it from 644 to 755 for example.


Apparently this is not true, and hurts interoperability pretty badly.
http://www.virtualbox.org/ticket/4890
http://www.virtualbox.org/ticket/5568
olegych
 
Posts: 1
Joined: 24. Feb 2011, 11:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: ubuntu

Re: Shared folder file permissions - changed in 3.0.4?

Postby lipi » 9. Mar 2011, 05:40

For those desperately looking for a workaround, below is a hack I just added to svn_io_remove_file and svn_io_file_rename in subversion-1.6.12. It works for me but still needs dmode=755 in the mount options.

Code: Select all   Expand viewCollapse view
--- subversion/libsvn_subr/io.c   (revision 1079652)
+++ subversion/libsvn_subr/io.c   (working copy)
@@ -1825,6 +1825,13 @@
   SVN_ERR(cstring_from_utf8(&path_apr, path, pool));
 
   apr_err = apr_file_remove(path_apr, pool);
+  /* begin hack for vboxsf: force write permission before remove */
+  if (apr_err) {
+      SVN_ERR(svn_io_set_file_read_write(path, TRUE, pool));
+      apr_err = apr_file_remove(path_apr, pool);
+  }
+  /* end hack for vboxsf */
+
 #ifdef WIN32
   if (apr_err)
     {
@@ -2912,6 +2919,13 @@
 
   status = apr_file_rename(from_path_apr, to_path_apr, pool);
 
+  /* begin hack for vboxsf: force write permission before rename */
+  if (status) {
+      SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool));
+      status = apr_file_rename(from_path_apr, to_path_apr, pool);
+  }
+  /* end hack for vboxsf */
+
 #ifdef WIN32
   /* If the target file is read only NTFS reports EACCESS and
      FAT/FAT32 reports EEXIST */
lipi
 
Posts: 1
Joined: 9. Mar 2011, 05:22
Primary OS: MS Windows Vista
VBox Version: OSE Debian
Guest OSses: Ubuntu

Re: Shared folder file permissions - changed in 3.0.4?

Postby phatrick » 15. Mar 2011, 01:34

I Wonder if there will be a solution to this. A rather clunky workaround is just to zip the checked out folder up and pass this between guest and host.
phatrick
 
Posts: 2
Joined: 11. Mar 2011, 12:27
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu, OpenSUSE

Re: Shared folder file permissions - changed in 3.0.4?

Postby kenyee » 14. Apr 2011, 04:07

lipi wrote:For those desperately looking for a workaround, below is a hack I just added to svn_io_remove_file and svn_io_file_rename in subversion-1.6.12. It works for me but still needs dmode=755 in the mount options.


Did you submit this to the subversion folks?
kenyee
 
Posts: 33
Joined: 31. Dec 2007, 05:19

Re: Shared folder file permissions - changed in 3.0.4?

Postby kenyee » 14. Apr 2011, 15:06

FYI, I reported the patch to the subversion issue tracker. Hopefully it'll be an official patch since it looks like it's non-harmful...
kenyee
 
Posts: 33
Joined: 31. Dec 2007, 05:19

Re: Shared folder file permissions - changed in 3.0.4?

Postby kenyee » 15. Apr 2011, 15:45

Looks like subversion 1.7 (you have to build it out of their trunk) handles this quirk in virtualbox's shared folders. However, if you have any symbolic links in your repo, you'll bomb out with this error which doesn't seem to be a permissions issue:

http://www.virtualbox.org/ticket/8728
kenyee
 
Posts: 33
Joined: 31. Dec 2007, 05:19

PreviousNext

Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 9 guests