Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to save file security.yaml in vendor/rockettheme/toolbox/File/src/AbstractFile.php #3458

Closed
leonheess opened this issue Oct 4, 2021 · 3 comments

Comments

@leonheess
Copy link

leonheess commented Oct 4, 2021

I followed the documentation but I'm getting this:

Uncaught RuntimeException: Failed to save file /var/www/test.tld/user/config/security.yaml in /var/www/test.tld/vendor/rockettheme/toolbox/File/src/AbstractFile.php:369

I followed the troubleshooting recommendation and tried:

chown -R joeblow:staff .
find . -type f -exec chmod 664 {} \;
find ./bin -type f -exec chmod 775 {} \;
find . -type d -exec chmod 775 {} \;
find . -type d -exec chmod +s {} \;

But it doesn't help. I'm using CentOS 8, PHP 7.4.19 and nginx 1.14.1.

@mahagr
Copy link
Member

mahagr commented Oct 5, 2021

It does sound like that your server is using different permissions for your user. Apache usually uses something like apache as the user and group, so you may want to tweak the permissions of the files or change the apache user for the site to yours.

@leonheess
Copy link
Author

@mahagr Thanks for the fast response! I'm using nginx - how could I verify and solve this issue? I'm very new to Grav.

@mahagr
Copy link
Member

mahagr commented Oct 6, 2021

You can try to temporarily set the folder/file permission to be world-writable -- if the error goes away, you will at least know for sure where the issue is.

To fix it, it really depends on the server and generally means changing the permission settings either for your server or user (or both). The easiest fix would be to create one site per user and just give nginx the same user and group. Try googling on how to do that in your server environment.

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

No branches or pull requests

2 participants