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

Do not have permissions to write to a file #2851

Open
edytajordan opened this issue Nov 16, 2019 · 1 comment
Open

Do not have permissions to write to a file #2851

edytajordan opened this issue Nov 16, 2019 · 1 comment

Comments

@edytajordan
Copy link

edytajordan commented Nov 16, 2019

Hello,

I am not able to write to a file (any type), do any error logs, etc. None of the things I tried for changing permissions worked. It doesn't work on both Mac or Windows. Not sure what I'm doing wrong.

@edytajordan edytajordan changed the title Laravel app cannot write error logs to a file in folder on Vagrant, but can in XAMPP/MAMP Do not have permissions to write to a file Nov 17, 2019
@jeromejaglale
Copy link

I was having the same problem. More precisely, I was not able to write into a file in /var/www. Writing in /tmp was working. I compared the permissions on the folders with a previous install which was working and I noticed that the folder /var/www belongs to www-data in my previous install and belongs to vagrant in the new install. I went into the config.yaml file, changed vagrant to www-data in this block:

        synced_folder:
            folder1:
                owner: www-data
                group: www-data
                source: ./
                target: /var/www

Then it worked as expected.

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

No branches or pull requests

2 participants