Wruczek / ts-website

A website for your TeamSpeak 3 server
https://ts.wruczek.tech
GNU General Public License v3.0
344 stars 80 forks source link

Cache save and read test Something went wrong! Please make sure that private/cache directory is writable #137

Closed TrickShotMLG02 closed 5 years ago

TrickShotMLG02 commented 5 years ago

How can i fix it? I am using this version: "ts-website-dev-2.0.3-fed9b56"

toster234 commented 5 years ago

Please make sure that private/cache directory is writable

TrickShotMLG02 commented 5 years ago

grafik

TrickShotMLG02 commented 5 years ago

like this?

TrickShotMLG02 commented 5 years ago

Please make sure that private/cache directory is writable

how can i do this?

Wruczek commented 5 years ago

Files and folders inside the cache directory need to be writable as well

TrickShotMLG02 commented 5 years ago

grafik

TrickShotMLG02 commented 5 years ago

like that?

TrickShotMLG02 commented 5 years ago

grafik Does this really makes sense? The test says, that the permissions are correct for the cache folder

TrickShotMLG02 commented 5 years ago

What means this?

Warning: file_put_contents(cache/ccfe1cf91aa294c9bf205f86365d5354.cache.php): failed to open stream: Permission denied in /var/www/html/TeamSpeak/private/vendor/wruczek/php-file-cache/src/PhpFileCache.php on line 116

Wruczek commented 5 years ago

failed to open stream: Permission denied

TrickShotMLG02 commented 5 years ago

what means that?

Wruczek commented 5 years ago

PHP does not have permission to write to that file

TrickShotMLG02 commented 5 years ago

how can i fix all of these problems?

Wruczek commented 5 years ago

You need to fix your linux permissions, not sure whats exactly wrong with yours and Im not an expert with Linux perms, but try chmodding and chowning the entire cache directory. You can also try to empty it and let ts-website create all sub-directories

TrickShotMLG02 commented 5 years ago

chmod 777? chown www-data?

cobs14 commented 5 months ago

It finally turns out that the parent directory of the cache is not granted with suitable permission (say, the whole project directory is in the possession of the root user) so PHP failed to create a file within the cache dir. Simply changing the owner of the project solves the problem:

chmod -R www-data:www-data ts-website (if you keep using the initial folder name, instead of solely changing the permission of cache dir)

Hopefully this will help someone in need.

Wruczek commented 5 months ago

It finally turns out that the parent directory of the cache is not granted with suitable permission (say, the whole project directory is in the possession of the root user) so PHP failed to create a file within the cache dir. Simply changing the owner of the project solves the problem:

chmod -R www-data:www-data ts-website (if you keep using the initial folder name, instead of solely changing the permission of cache dir)

Hopefully this will help someone in need.

That's correct, in recent TS-website versions the installer suggests running this command: sudo chown -R www-data:www-data "{ts-website directory path}"