permission of shared directory
permission of shared directory
Hi !
I have a question about shared directory. I have a windows host and i installed a linux (redhat 5) guest.
I installed also the guest additions. Then i created a shared directory. And my problem is that only the root can write in the shared directory. Then I have to do a change user (su) before copy a file from the guest into the shared folder.
Do you know how i can change this ?
Thank you
I have a question about shared directory. I have a windows host and i installed a linux (redhat 5) guest.
I installed also the guest additions. Then i created a shared directory. And my problem is that only the root can write in the shared directory. Then I have to do a change user (su) before copy a file from the guest into the shared folder.
Do you know how i can change this ?
Thank you
-
- 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
You can change this by changing the mount options. Read the man page of mount for the syntax of the options. You need to specify the uid and gid of your user with the mount options. If you mount the shared folder directly in your home folder, you shouldn't have these problems. However, I have seen it where there was a folder in my home that only root could access. This was the driver for my printer which I ran as root. With the uid and gid options, it will all work just fine. Don't forget to use either defaults, or the options you need too. 'man mount' is your friend. Read it carefully.
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.
Thank you
I mount the shared folder into my home directory and it is ok. But when i closed the root terminal it does not work any more.
I read the mount's man but i am not famous in linux and i don't understand how i have to do to specify the uid and gid of my user. If you know that can you say it to me ?
Thanks
I mount the shared folder into my home directory and it is ok. But when i closed the root terminal it does not work any more.
I read the mount's man but i am not famous in linux and i don't understand how i have to do to specify the uid and gid of my user. If you know that can you say it to me ?
Thanks
-
- 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 GID and UID depends on your user and setup. Some have 1000 as GID and UID, others have a different number. You can check this by typing 'cat /etc/passwd' in a terminal. Find your username and there should be a number on that line. That is your UID. The GID is often the same, but to be certain, use 'cat /etc/group'. I'm not certain that it actually lists your usergroup.
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.
-
- 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
Oh, the syntax is really easy. There is a field where you set the options, it's comma separated, so use it like this:
Code: Select all
mount -t vboxsf sharefolder /point/to/mount -o user,uid=1000,gid=1000,exec,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.
I do not write user because it says that it is not a good option.
So i juste write
The name of the group and the owner are good. If I do an ls -l in the command line I see my name and my group name. But I can't write or delete anything in the folder.
So i juste write
Code: Select all
mount -t vboxsf test /home/Ger/common/ -o uid=749,gid=201,exec,rw
-
- 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 set the SF to be writable? There is a checkbox that makes it read only, clear that. If that does not work, I have no idea what is the problem, it could be a bug. I don't have Linux as a Guest system, so I can't check it.
Also, the reason I added user to the options, is that the user who mounted the system can unmount it. With users, everyone can unmount the mount. If you put it in your fstab, it should load automatically.
Also, the reason I added user to the options, is that the user who mounted the system can unmount it. With users, everyone can unmount the mount. If you put it in your fstab, it should load automatically.
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.
First thank you a lot for your help !
Is it good ?
Second what I have to put in my fstab ?
Thanks
I created a new folder in my home directory. If I do a ll command I see that this directory is :Did you set the SF to be writable?
Code: Select all
drwxr-xr-x
For this I need some precision. First I mount the shared folder when I am root. Is it ok ? The system said me that only root can use mount !Also, the reason I added user to the options, is that the user who mounted the system can unmount it. With users, everyone can unmount the mount. If you put it in your fstab, it should load automatically
Second what I have to put in my fstab ?
Thanks
-
- 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 SF is default writable. For the fstab entry, that is about the same as what you type for mounting it manually. Mounting it is indeed a root task, but with the uid and gid options, it looks like you mounted it, not root . Look for the right context in fstab for the entries that are already in there, and of course the man page.
It would be something like this:
I did find that on my XP VM, SF is not perfect either. I have 2 VMs with XP, one crashes when I use it with a BSOD, the other can't open files correctly or write them. There is still a lot of work to be done to get it working fine.
It would be something like this:
Code: Select all
#Entry for Shared Folder:
sharefolder /mount/point/for/sf vboxsf auto,users,exec,rw,uid=1000,gid=1000 0 0
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.