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

777 folder permissions #7

Open
Brunty opened this issue Mar 4, 2015 · 12 comments
Open

777 folder permissions #7

Brunty opened this issue Mar 4, 2015 · 12 comments

Comments

@Brunty
Copy link

Brunty commented Mar 4, 2015

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)

@Brunty
Copy link
Author

Brunty commented Mar 4, 2015

Would there be a way to specify that certain folders require 777 permissions via the .dashbrew YAML file within the project?

@mohatt
Copy link
Owner

mohatt commented Mar 4, 2015

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.

@Brunty
Copy link
Author

Brunty commented Mar 4, 2015

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'

@mohatt
Copy link
Owner

mohatt commented Mar 4, 2015

Looks good, thank you for looking into this :) I will try to get this feature done by next week.

@Brunty
Copy link
Author

Brunty commented Mar 4, 2015

@mdkholy that would be amazing.

Off topic: This is a seriously cool project by the way, really nicely done.

@mohatt
Copy link
Owner

mohatt commented Mar 4, 2015

Thanks @Brunty :) I hope we could turn this into something useful to the PHP community.

@andpavlenko
Copy link

Also expect 'permissions' feature...
Cool project! Thanks.

@frdmn
Copy link

frdmn commented Apr 21, 2015

Same here, 👍

@elalemanyo
Copy link

Very nice Project!
... also expecting 'permissions' feature, 👍
Thanks!

@anotherfrontendguy
Copy link

Thanks for your work on this project.
also: +1

@gebeer
Copy link

gebeer commented Nov 1, 2015

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

@maximepvrt
Copy link

Who found a solution ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants