Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Cache saved with wrong user #127

Closed
verschoof opened this issue Jan 18, 2017 · 3 comments
Closed

Cache saved with wrong user #127

verschoof opened this issue Jan 18, 2017 · 3 comments

Comments

@verschoof
Copy link

Hi,

I use a library that uses zend-cache. (psliwa/PHPPdf#122)
Now, zend-cache is caching files into my cache location but with the wrong user.

Is there a way I can tell zend-cache that he has to write as another user?

@Ocramius
Copy link
Member

@verschoof the user is determined by the user that starts the PHP process that creates the file, and cannot really be controlled on our side.

This would usually require a privileged call, or root privileges, and running PHP as root is generally a messed up idea: https://secure.php.net/manual/en/function.posix-setuid.php

@froschdesign
Copy link
Member

@verschoof
For the Filesystem adapter you can set file and directory permissions. (zend-cache uses PHP's chmod)
But no user. (see comment above)

@verschoof
Copy link
Author

Alright thanks guys!

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

No branches or pull requests

3 participants