Setting permissions when mounting the host's shared folder
Setting permissions when mounting the host's shared folder
I got Debian Etch virtualized inside of my new Macbook Pro and running an apache server. Been a great learning experience so far. I was able to get guest additions installed so I can share file folders between the two OSes.
One problem I'm trying to solve is setting the umask when mounting the shared file system with -o UID=XX -o GUID=XX. Without a mask, any file created in the shared folder defaults to the Mac's permissions, rw-------. I'd like these files to be read/writable by any user on the machine. I looked in /etc/passwd and tried using 0 for UID and 99 for GUID but that didn't help. Not sure what else I should try. I'm new to Max OS X.
One problem I'm trying to solve is setting the umask when mounting the shared file system with -o UID=XX -o GUID=XX. Without a mask, any file created in the shared folder defaults to the Mac's permissions, rw-------. I'd like these files to be read/writable by any user on the machine. I looked in /etc/passwd and tried using 0 for UID and 99 for GUID but that didn't help. Not sure what else I should try. I'm new to Max OS X.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
What if you use '-o umask 777' as mount option for the shared folders. Just take a look at the man page for mount, you will see what options are available and what you need.
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.
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.
Tried that already
It threw an error saying umask was not an option.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Did you take a look at the man page for mount (man mount or man 8 mount)? It's also possible that it's not an option for the vboxsf file system.
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.
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.
Another thing: I cannot even chmod the files with the Linux guest. It simply has no effect.
I have to go to the mac file system, give myself permission to change the permissions by clicking on a little lock icon and then typing in my user password, and only then can the file's permissions be changed. Needless to say, this is not practical.
I have to go to the mac file system, give myself permission to change the permissions by clicking on a little lock icon and then typing in my user password, and only then can the file's permissions be changed. Needless to say, this is not practical.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Could be a MAC issue. I wonder what the devs have to say about this.
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.
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.
Just type in 'mount.vboxsf' alone in the terminal and it will show all the possible options.
But vboxsf does not understand altering acl. I also wish this were possible, but could just change the permissions on the host file system then.
You can use the 'uid=MyLinuxUser', 'gid=MyLinuxGroup' kind of option on the 'mount' command to give ownership to the user on the guest system.
You should use the terminal instead of using GUI to change permissions. Run the terminal, 'cd' into the folder and do the 'sudo chmod 0755 MyFolder AnotherFolder' or some such and type in your password. 'sudo' will remember that you are authorized for a while, so consecutive 'sudo' will not ask you anymore passwords.
Read up on 'man chmod' for detailed instructions on the bits.
But vboxsf does not understand altering acl. I also wish this were possible, but could just change the permissions on the host file system then.
You can use the 'uid=MyLinuxUser', 'gid=MyLinuxGroup' kind of option on the 'mount' command to give ownership to the user on the guest system.
You should use the terminal instead of using GUI to change permissions. Run the terminal, 'cd' into the folder and do the 'sudo chmod 0755 MyFolder AnotherFolder' or some such and type in your password. 'sudo' will remember that you are authorized for a while, so consecutive 'sudo' will not ask you anymore passwords.
Read up on 'man chmod' for detailed instructions on the bits.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
The way I have my SF mounted in Ubuntu Server (from Ubuntu Desktop Host) is with this line:
When I type "ls -l /data", I see my username and group as owner.
Code: Select all
data /data vboxsf defaults,gid=1000,uid=1000,auto,rw
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.
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.
missing the point
I also share this problem — it's not an issue of setting the uid and gid — the big problem here is that I can't set the executable bit, and there doesn't seem to be a way to have it set by default for new files.
So in other words, you can't compile or write scripts in a shared folder. Which is unfortunately exactly what I want to do (use the VM as a cross compiler, so I develop on my host OS, keep the source code in a shared folder, and then run the compiler in the VM). But since any generated build tools are non-executable, that screws up the build, and even if I got through that, I wouldn't be able to run/debug the final product because I (and the compiler) can't mark it executable.
This is really screwing up my workflow
So in other words, you can't compile or write scripts in a shared folder. Which is unfortunately exactly what I want to do (use the VM as a cross compiler, so I develop on my host OS, keep the source code in a shared folder, and then run the compiler in the VM). But since any generated build tools are non-executable, that screws up the build, and even if I got through that, I wouldn't be able to run/debug the final product because I (and the compiler) can't mark it executable.
This is really screwing up my workflow
known issue
Ah a bit more searching this has been discussed:
http://forums.virtualbox.org/viewtopic.php?t=6691
And there's a ticket here:
http://www.virtualbox.org/ticket/1776
http://forums.virtualbox.org/viewtopic.php?t=6691
And there's a ticket here:
http://www.virtualbox.org/ticket/1776