Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Using Symlinks in /public #77

Open
thehashrocket opened this issue Jan 22, 2014 · 3 comments
Open

Using Symlinks in /public #77

thehashrocket opened this issue Jan 22, 2014 · 3 comments
Labels
Milestone

Comments

@thehashrocket
Copy link

I'd like to use symlinks (or something better?) to map paths from /public to my projects in my projects folder.

I thought I could just place a symlink in there and i'd be ok since FollowSymLinks is in Options in the virtualhost file. However, this doesn't seem to be the case. I made sure to do chmod o+x on the folder also.

Anyway, I've tried googling but really haven't found anyone whose doing that so maybe you have an idea?

Here's a copy of the error i'm seeing in the log:

[client 192.168.33.1] Symbolic link not allowed or link target not accessible: /vagrant/public/homewood.dev

@Martin1982
Copy link

This might be a 'problem' (there's a good reason for it) with VirtualBox itself; https://coderwall.com/p/qklo9w

I don't think allowing symlinks by default would be a good option though. This would introduce the mentioned security vulnerability to the vagrant-lamp project where users might modify files outside of the public directory without knowing.

When I first provisioned this box I ran into the same thing, so I'd love to see a discussion started here on what would be the 'right way' or 'lesser evil'.

My workflow now is to checkout the project to the 'public' directory and set the docroot in the databag.

@pmgarman
Copy link
Contributor

@jshultz in your vagrantfile you can map the directory as a synced folder. I completely deleted the public folder from the vagrant and then added this to my vagrant file. Now my Projects dir is the Public dir without any symlinking.

config.vm.synced_folder "../../Projects", "/vagrant/public", mount_options: ['dmode=777','fmode=666']

@thehashrocket
Copy link
Author

thank you! :)

Jason Shultz

Tel: 801-784-0224
url: www.JasonShultz.com

On Fri, Feb 28, 2014 at 9:39 AM, Patrick Garman notifications@github.comwrote:

@jshultz https://github.com/jshultz in your vagrantfile you can map the
directory as a synced folder. I completely deleted the public folder from
the vagrant and then added this to my vagrant file. Now my Projects dir is
the Public dir without any symlinking.

config.vm.synced_folder "../../Projects", "/vagrant/public", mount_options: ['dmode=777','fmode=666']

Reply to this email directly or view it on GitHubhttps://github.com//issues/77#issuecomment-36369228
.

@r8 r8 added this to the v1.1.0 milestone Mar 29, 2015
@r8 r8 added the bug label Mar 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants