-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
write to cache with 775/664 permission (not images) #1013
Comments
Have you set the 'sticky bit' ( |
I think we could add configuration setting for umask? Generally I would do this in PHP configuration, though. |
I think I did the |
I just got into this again and I don't think that the sticky bit or umask will solve my issue here. The sticky bit makes sure that only the owner (me) can delete/rename files in a folder. I don't really see a reason to use it in this case as I'm not in a multi-user environment and don't have to worry about anyone messing with my files.
I can set |
We have a similar issue, but with the images folder. Even if I have set the umask to 002 at the file system level, and in Apache, new directories in images are created with 755 instead of 775. |
Ditto, @pascalrobert. I haven't figured out whether it's a problem with my hosting setup or with Grav itself. No matter how I set umask, the contents of my |
Even with ACLs, when the folders are recreated, the effective rights don't have write permissions. |
Can you try somethign for me: Create a file called
if you already have a setup.php, just add it to the top. This file should get picked up and used for every Grav call. |
BTW, i'm assuming you have already tried the optional
|
cache_perms: '0775' was already set. Tried the trick with setup.php, didn't work. I do notice something strange:
So umask is right, but:
Permissions are not what umask says it should be. This is on Ubuntu 12.04, the site is running under a LXC container. |
Doh! How did I not know about |
HI, is there any solution with the cache files? I have the same issue like @simonhaenisch and all solutions from the docs do not work (except running apache under the same user like the ssh user, but thats not an option for me). Cache files created by grav have only 644 and 755 permissions |
Did you try the setup.php solution i posted above?? How about the cache_perms option in system.yaml?? |
@rhukster thank you, now it is working. I thought the setup.php was for the images :-) I searched 2 days for a solution, but now problem solved. Thank you again for the hint. Could this be added to the documentation? In my opinion simple and nice solution |
I have it i the list of topics to document: getgrav/grav-learn#356 |
Is it possible to setup Grav so that the files created in the
cache
folder have775
/664
permissions instead of755
/644
? I know it's possible to set it for images, but I haven't found an option for normal file cache.I use a setup where PHP runs as
www-data
user and my user (for ssh) is in thewww-data
group. All folders have775
and files have664
. That way I can use GPM from either the admin panel or command line.But when Grav writes some files to cache with
755
/644
permissions, I can't usebin/gpm
via command line until I fix the permissions of thecache
directory. (I can use it, but I get permission errors when trying to install something)The text was updated successfully, but these errors were encountered: