Warning: mkdir(): Permission denied – Vagrant

You may face something bad that when you run any application you will need to change it the apache owner ( so you can make directories and gain privilege )

You will find when you run your web application that the folders don’t have a permission , may be you can go and give them privilege with chown command .

put it’s better to add it in apache so any new application gain the privilege
its not possible to change /vagrant directory owner to www-data (apache user), so what you have to do is make the following

  1. edit /etc/apache2/apache2.conf;
  2. Search for User and Group directives
  3. Change these lines to:
    User vagrant
    Group vagrant
  4. run sudo apache2 restart;


vagrant is more cool than MAMP i have to admit that …


Also you may want to edit the persmission to the folders and files with the following

,:mount_options => [ “dmode=777”, “fmode=777” ]


Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: