Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: File permissions of shared folder using virtualbox

  1. #1
    Join Date
    Feb 2010
    Beans
    7
    Distro
    Ubuntu Studio 9.10 Karmic Koala

    File permissions of shared folder using virtualbox

    I am running ubuntu using VirtualBox on a Macbook Pro. I wanted to share my documents folder on the Mac in the virtual machine. I had no issues creating/mounting the share folder on ubuntu. However the file permissions for the shared folder are owned by root.
    Code:
     
    drwx------  1 root     root        1088 2010-02-04 10:18 Mac_Share/
    I used the following command to mount the folder:
    Code:
    sudo mount -t vboxsf Share_Documents ~/Mac_Share/
    I checked that the folder is mounted I can see what is there using
    Code:
     sudo ls Mac_Share/
    How do I make the folder accessible to the user? Is there another -option needed to do this in the mount command?
    Or do I need to chown for the directory? If so how to do this?

  2. #2
    Join Date
    Feb 2008
    Beans
    29
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: File permissions of shared folder using virtualbox

    this may be mac related, so you might not find much help here

    I have windows XP as a guest on a Ubuntu host, and i got shared folders to work pretty well

    sry, I can't help you because i don't use MACS
    Dell Latitude 256 MB RAM <--- RIP
    Pentium 3 (Coppermine)
    NeoMagicGraph 256av Graphics
    Fujitsu 60 GB ATA Hard Disk <-- Still using

  3. #3
    Join Date
    Feb 2010
    Beans
    7
    Distro
    Ubuntu Studio 9.10 Karmic Koala

    Re: File permissions of shared folder using virtualbox

    I don't think this is a mac issue.
    As I said earlier I can see the files on Ubuntu, however they are owned by root. I would like to be able to access them without sudo commands.

  4. #4
    Join Date
    Feb 2008
    Beans
    29
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: File permissions of shared folder using virtualbox

    have you tried going to:

    System > Administration > Users and Groups

    try looking for a permission having to do with what you want to do, and add your user to it
    Dell Latitude 256 MB RAM <--- RIP
    Pentium 3 (Coppermine)
    NeoMagicGraph 256av Graphics
    Fujitsu 60 GB ATA Hard Disk <-- Still using

  5. #5
    Join Date
    Feb 2010
    Beans
    7
    Distro
    Ubuntu Studio 9.10 Karmic Koala

    Re: File permissions of shared folder using virtualbox

    There aren't any option that help in System > Administration > Users and Groups

    I would like to change the owner of the directory from root to a user.
    Running commands as root such as:

    chmod 775 Mac_Share
    does nothing, permissions for folder are still ( drwx------ 1 root root )

    chmod -R 775 Mac_Share
    changes the permissions of the files in the directory but not the directory itself. No use if I can't read directory.

  6. #6
    Join Date
    Feb 2008
    Beans
    29
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: File permissions of shared folder using virtualbox

    are you sure there isn't something in there?

    Users and groups is a very powerful tool

    I had to be in a certain group to access windows (samba) shares in vbox



    I don't know what MACS use for file-sharing
    Attached Images Attached Images
    Dell Latitude 256 MB RAM <--- RIP
    Pentium 3 (Coppermine)
    NeoMagicGraph 256av Graphics
    Fujitsu 60 GB ATA Hard Disk <-- Still using

  7. #7
    Join Date
    Aug 2008
    Beans
    Hidden!

    Re: File permissions of shared folder using virtualbox

    What's the filesystem of the host shared documents folder?

    You should look at the mount options rw and (if the filesystem doesn't have user/group/other permission bits) umask.
    Something like
    Code:
    sudo mount -t vboxsf Share_Documents ~/Mac_Share/ -o rw,umask=0000
    Or, define the share in /etc/fstab with the user or users options, and then mount them without sudo.
    Add a line like
    Code:
    Share_Documents	/media/Mac_Share	vboxsf	rw,users,umask=0000	0	0
    Not tested and not guaranteed!

  8. #8
    Join Date
    Feb 2010
    Beans
    7
    Distro
    Ubuntu Studio 9.10 Karmic Koala

    Re: File permissions of shared folder using virtualbox

    Thanks SecretCode,
    I researched mount option more closely and found a solution.

    I googled some more on the subject: "virtualbox mount shared folder from mac host to linux guest" and found a useful link: http://davidherron.com/node/1043

    Here David Herron walked through how he setup the mount including the issue I am having with root.

    I was able to read the file by defining uid and gid with the -o option for mount
    Code:
    sudo mount -t vboxsf -o uid=1000,gid=1000 Share_Documents ~/Mac_Share/
    I can now read/write the files as local user.

    Thanks everyone for their help,
    - nikwasi

  9. #9
    Join Date
    Aug 2008
    Beans
    Hidden!

    Re: File permissions of shared folder using virtualbox

    Great. (You can mark the thread as solved now.)

  10. #10
    Join Date
    Apr 2008
    Beans
    10

    Re: File permissions of shared folder using virtualbox

    Same happened to me (mac os host, ubuntu guest). My solution was to share another folder in virtualbox (i used the mac /Users/Shared) and the mounting in ubuntu sudo mount -t vboxsf shared /home/(mountpoint). worked.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •