#Panel not working, permission denied issue

7 messages · Page 1 of 1 (latest)

stray spade
#

Hello! I installed the Panel and Wings but I must have skipped something or done something wrong because when I go to my panel page I get "This page isn't working". I checked the logs and the following output shows in var/log/nginx/pterodactyl.app-error.log:

2023/12/05 00:57:53 [error] 910#910: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/var/www/pterodactyl/storage/framework/views/4e5709c1c93b720882e66b4c395cf5d7.php): Failed to open stream: Permission denied in /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:190
Stack trace:
#0 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(250): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(190): file_put_contents()
#3 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(185): Illuminate\Filesystem\Filesystem->put()
#4 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(62): Illuminate\View\Compilers\BladeCompiler->compile()

Not sure what might be going on here, I tried using several commands to give permissions but wasn't successful. Hope you can help. Thanks in advance 🙏

I'm on Rocky Linux 9

rare loomBOT
stray spade
#

Just to confirm, I did try the following commands:

  • chown -R apache:apache /var/www/pterodactyl/*
  • chown -R nginx:nginx /var/www/pterodactyl/*
  • cd /var/www/pterodactyl/ && chmod -R 755 storage/* bootstrap/cache/
  • sudo chmod -R 775 /var/www/pterodactyl/storage
  • sudo chmod -R 664 /var/www/pterodactyl/storage/*
silver crag
#

ls -l /var/www
See what your webserver user is. If using nginx on a CentOS based distro it should be nginx. If using apache, probably apache.

If that's the case, set ownership back to nginx:nginx or whatever user your webserver uses, set permissions back to 755 like the bot suggested: cd /var/www/pterodactyl/ && chmod -R 755 storage/* bootstrap/cache/

And restart your webserver service.

stray spade
#

I did the above and can confirm nginx has the necessary permissions for the pterodactyl folder

stray spade
#

I think it might be a mysql permission thing, I found this in laravel logs:
[previous exception] [object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'pterodactyl'@'localhost' (using password: YES) at /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65) [stacktrace]

rare loomBOT
#

🇫🇷 🥖 Bienvenue sur Internet, @stray spade 🥖 🇫🇷

Your database is refusing the Panel's attempts to connect to it. This can be for a number of different reasons so I'll let a human double check, but here are some ideas.

  1. Is your MySQL instance running? systemctl status mysql(hopefully not down the road)
  2. Is the user you're trying to connect with authorized to access the given database from this IP address?
  3. Did you correctly give that user permission to even access that database?
  4. Do you have a Firewall that is blocking connections?
  5. Is your MySQL instance bound to 127.0.0.1 or localhost and you're trying to connect from outside the server?
  6. Does the user have GRANT permissions if you're trying to use them to create a new database for a server?
  7. Have special characters in your password? Make sure DB_PASSWORD in your .env file is enclosed in double quotes

Here is some additional documentation to help you out: https://pterodactyl.io/tutorials/mysql_setup.html