Sunday, January 14, 2018

If you face errors because of permissions in the shared folder

If you face errors because of permissions in the shared folder, run this command to change the folder's owner to apache:
$ sudo chown -R apache:apache /vagrant/cake

If this doesn't work, add this line as it is in Vagrantfile:
config.vm.synced_folder "./", "/vagrant", owner: 'vagrant', group: 'apache', mount_options: ['dmode=777', 'fmode=777']

And "vagrant reload".

If even that didn't work, it might be because of SE linux. Turn off SE linux this way:
$ sudo getenforce
Enforcing
$ sudo setenforce 0
$ sudo getenforce
Permissive

And "vagrant reload".