{"id":1142,"date":"2015-04-30T13:50:22","date_gmt":"2015-04-30T11:50:22","guid":{"rendered":"http:\/\/www.speich.net\/articles\/?p=1142"},"modified":"2024-09-25T17:26:10","modified_gmt":"2024-09-25T15:26:10","slug":"how-to-automount-your-virtualbox-shared-folder-to-varwww","status":"publish","type":"post","link":"https:\/\/www.speich.net\/articles\/en\/2015\/04\/30\/how-to-automount-your-virtualbox-shared-folder-to-varwww\/","title":{"rendered":"How to auto mount your VirtualBox shared folder to \/var\/www\/"},"content":{"rendered":"\n<p>You need to have the Guest Additions installed first, then you can setup a shared folder in the settings, let&#8217;s say <code>Websites <\/code>and mount it to <code>\/var\/www\/html\/<\/code>.<\/p>\n\n\n\n<p>Then, inside the virtual machine, add that shared folder <code>Websites<\/code> to the <code>fstab<\/code> by adding the line<\/p>\n\n\n\n<pre><code class=\"language-bash\">Websites \/var\/www\/html vboxsf rw,uid=33,gid=33 0 0<\/code><\/pre>\n\n\n\n<p>and giving the right permissions.<\/p>\n\n\n\n<p>If you get the following error during boot:<\/p>\n\n\n\n<pre><code class=\"language-bash\">keys:Press S to skip mounting or M for manual recovery<\/code><\/pre>\n\n\n\n<p>Then, you&#8217;ll have to add <code>vboxsf<\/code> on a line of its own in <code>\/etc\/modules<\/code> to force loading it early.<br>Solution found on <a href=\"http:\/\/askubuntu.com\/questions\/365346\/virtualbox-shared-folder-mount-from-fstab-fails-works-once-bootup-is-complete\" target=\"_blank\" rel=\"noreferrer noopener\">askubuntu.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need to have the Guest Additions installed first, then you can setup a shared folder in the settings, let&#8217;s say Websites and mount it to \/var\/www\/html\/. Then, inside the virtual machine, add that shared folder Websites to the fstab by adding the line Websites \/var\/www\/html vboxsf rw,uid=33,gid=33 0 0 and giving the right permissions. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.speich.net\/articles\/en\/2015\/04\/30\/how-to-automount-your-virtualbox-shared-folder-to-varwww\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to auto mount your VirtualBox shared folder to \/var\/www\/&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[54,92],"class_list":["post-1142","post","type-post","status-publish","format-standard","hentry","category-others","tag-linux-mint","tag-virtualbox","entry"],"_links":{"self":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/1142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/comments?post=1142"}],"version-history":[{"count":7,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/1142\/revisions"}],"predecessor-version":[{"id":2461,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/1142\/revisions\/2461"}],"wp:attachment":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/media?parent=1142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/categories?post=1142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/tags?post=1142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}