Open Brunty opened 9 years ago
Would there be a way to specify that certain folders require 777 permissions via the .dashbrew YAML file within the project?
This is a common issue among Vagrant users who use the VirtualBox provider. It is because VirtualBox doesn't allow changing file permissions from within the VM.
A quick fix for this would be to add :mount_options => [ "dmode=776", "fmode=666" ]
to your Vagrantfile but I don't recommend it as it may other issues.
I think it would be very useful if we added a way to specify folder permissions in Dahsbrew project files.
I was taking a look, a way to mount certain folders within a project with certain permissions would be a really nice feature in the .dashbrew files for projects.
Perhaps something like this?
---
myproject:
title: My Project
php:
build: system
vhost:
servername: myproject.dev
serveraliases:
- www.myproject.dev
ssl: true
permissions:
relative/path/to/folder: '0777'
relative/path/to/another/folder: '0755'
Looks good, thank you for looking into this :) I will try to get this feature done by next week.
@mdkholy that would be amazing.
Off topic: This is a seriously cool project by the way, really nicely done.
Thanks @Brunty :) I hope we could turn this into something useful to the PHP community.
Also expect 'permissions' feature... Cool project! Thanks.
Same here, :+1:
Very nice Project! ... also expecting 'permissions' feature, :+1: Thanks!
Thanks for your work on this project. also: +1
Has this been implemented yet? I can't seem to find it in the docs.
BTW, wouldn't it be better to setup the box so that apache runs as user vagrant, like proposed here?
Sorry, just realized that PHP is running as FastCGI, so these settings won't have the desired effect
Who found a solution ?
I'm not sure if this is related to dashbrew or something's wrong with vagrant / the CMS I'm using for me (I'm not massively experienced with Vagrant outside of using pre-made puphpet setups really) so my apologies if it's not an dashbrew issue but something I'm misunderstanding.
I'm running bolt cms on a site, and it requires a few files / folders to have 777 permissions.
chmod -R 777 files/ app/database/ app/cache/ app/config/ theme/ extensions/
I set the permissions on my host machine, they display as 777 on the host machine, and within vagrant.
The site then complains that it can't write to the cache folder - I check the app/cache folder and the site has created some initial folders in there, but they've got 755 permissions and now the webserver can't write to them as they're owned by vagrant and the webserver is running as www-data.
I could go into the VM and change apache to run as vagrant instead of www-data but I'd prefer not to, is there a way of maintaining 777 permissions on the folders? (recursively inside them as well)