How do I set the Apache2 DocumentRoot to a "vboxsf" VirtualBox Shared Folder? (permissions issue?)

jcolebrand

I setup Ubuntu 11.04 desktop 32 bit on a VirtualBox VM with a shared folder to the host. The shared folder is

/media/sf_Dev/

I want to change Apache2 to point the DocumentRoot to that folder, so I edited /etc/apache2/sites-available/default to replace the existing two paths in that file to /media/sf_Dev/ instead of /var/www and it won't show index.html.

When I look at /var with ls -l I see

drwxr-xr-x  2 root root ... www

and when I ls -l /media/ I see

drwxrwx---  1 root vboxsf ... sf_Dev

and Apache doesn't seem to see the index.html I put in that directory (cp /var/www/index.html /media/sf_Dev/ iirc)

I also tried editing envvars to make the group be vboxsf but I think I did that part wrong.

export APACHE_RUN_GROUP=www-data

to

export APACHE_RUN_GROUP=vboxsf

What am I doing wrong, what do I need to do to get Apache2 to serve files from that directory? (technically I want to serve files for apache from /media/sf_Dev/apache/www but I figure one step at a time, so if that helps you short-circuit things, so be it)

Fuu

It would probably be easiest to add the vboxsf group as a supplementary group for apache.

Ubuntu:

sudo usermod -a -G vboxsf www-data

Fedora:

sudo usermod -a -G vboxsf apache

This does it for me when I want to access auto mounted shared folders. You might also want to add your own username to the vboxsf group to access the files.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I set permissions on a network-shared folder?

From Dev

How do I set permissions on a network-shared folder?

From Java

Virtualbox shared folder permissions

From Dev

Ubuntu Linux server - set file permissions for VirtualBox shared folder

From Dev

In a Virtualbox VM how do I set the filesystem permissions?

From Dev

Shared folder of VirtualBox as Apache2 www directory

From Dev

How do I set permissions on directory(folder) on IIS 6.0?

From Dev

Permission denied when accessing VirtualBox shared folder when member of the vboxsf group

From Dev

User can't see shared folder in VirtualBox guest even though she's in vboxsf group

From Dev

Vagrant/VirtualBox shared folders without vboxsf

From Dev

Vagrant/VirtualBox shared folders without vboxsf

From Dev

Apache2 permissions issue

From Dev

How do I revert to the previous permissions for a folder?

From Dev

How to access a shared folder in VirtualBox?

From Dev

How to access a shared folder in VirtualBox?

From Dev

How Do I check Permissions of Root Folder (/ Folder, not /root)?

From Dev

Ubuntu Desktop 18 virtualbox unable to change file permissions of shared folder

From Dev

Files copied to shared folder do not inherit permissions

From Dev

Apache2 | http.conf How do I set AllowOverride All on a directory

From Dev

How do I enable VirtualBox shared clipboard/drag-and-drop?

From Dev

How to mount a VirtualBox shared folder at startup?

From Dev

How to access a shared folder with Ubuntu on VirtualBox

From Dev

How do I copy a folder keeping owners and permissions intact?

From Dev

How do I archive a folder keeping owners and permissions intact?

From Dev

How do I sync Vagrant sync folder with VirtualBox and CentOS/Windows?

From Dev

VirtualBox shared folder headless

From Dev

How do I connect to a shared folder on the network on Fedora 23?

From Dev

I want to set the permissions of the target folder to 777

From Dev

VirtualBox Shared Clipboard issue

Related Related

  1. 1

    How do I set permissions on a network-shared folder?

  2. 2

    How do I set permissions on a network-shared folder?

  3. 3

    Virtualbox shared folder permissions

  4. 4

    Ubuntu Linux server - set file permissions for VirtualBox shared folder

  5. 5

    In a Virtualbox VM how do I set the filesystem permissions?

  6. 6

    Shared folder of VirtualBox as Apache2 www directory

  7. 7

    How do I set permissions on directory(folder) on IIS 6.0?

  8. 8

    Permission denied when accessing VirtualBox shared folder when member of the vboxsf group

  9. 9

    User can't see shared folder in VirtualBox guest even though she's in vboxsf group

  10. 10

    Vagrant/VirtualBox shared folders without vboxsf

  11. 11

    Vagrant/VirtualBox shared folders without vboxsf

  12. 12

    Apache2 permissions issue

  13. 13

    How do I revert to the previous permissions for a folder?

  14. 14

    How to access a shared folder in VirtualBox?

  15. 15

    How to access a shared folder in VirtualBox?

  16. 16

    How Do I check Permissions of Root Folder (/ Folder, not /root)?

  17. 17

    Ubuntu Desktop 18 virtualbox unable to change file permissions of shared folder

  18. 18

    Files copied to shared folder do not inherit permissions

  19. 19

    Apache2 | http.conf How do I set AllowOverride All on a directory

  20. 20

    How do I enable VirtualBox shared clipboard/drag-and-drop?

  21. 21

    How to mount a VirtualBox shared folder at startup?

  22. 22

    How to access a shared folder with Ubuntu on VirtualBox

  23. 23

    How do I copy a folder keeping owners and permissions intact?

  24. 24

    How do I archive a folder keeping owners and permissions intact?

  25. 25

    How do I sync Vagrant sync folder with VirtualBox and CentOS/Windows?

  26. 26

    VirtualBox shared folder headless

  27. 27

    How do I connect to a shared folder on the network on Fedora 23?

  28. 28

    I want to set the permissions of the target folder to 777

  29. 29

    VirtualBox Shared Clipboard issue

HotTag

Archive