Closed karthik8223 closed 3 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Does your user (administrator) have write permissions? Which user/group comes up as owner when you run ls -l when you are inside the snipe-it directory?
Does your user (administrator) have write permissions? Which user/group comes up as owner when you run ls -l when you are inside the snipe-it directory?
Hi Jonathan, first of all thank you so much for your reply and helping me on this. I will check them and let you know. I remembered i gave admin rights to the snipe it directory, but i will recheck them and update you.
Hi Jonathan, they are all in root access and we cant run php upgrade.php as root right ? I have to change the root user to administrator user ?
Correct, so you should change the owner to administrator by running: sudo chown -R $USER:$USER /var/www/your_domain
Here is a good start how to setup a LEMP stack: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-20-04
DigitalOceanThe LEMP software stack is a group of software that can be used to serve dynamic web pages and web applications written in PHP. This is an acronym that describes a Linux operating system, with an Nginx (pronounced like “Engine-X”) web server. The back
Correct, so you should change the owner to administrator by running: sudo chown -R $USER:$USER /var/www/your_domain
Here is a good start how to setup a LEMP stack: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-20-04
Hi Jonathan, yes. I was able to upgrade my snipeit after changing the owner to administrator. but after complete with the upgrade, I can't access the page. Please help me on where to troubleshoot. I have changed back the permission to root but still not possible to access the snipe it page.
Thank you so much for helping.
DigitalOceanThe LEMP software stack is a group of software that can be used to serve dynamic web pages and web applications written in PHP. This is an acronym that describes a Linux operating system, with an Nginx (pronounced like “Engine-X”) web server. The back
When you get an error or a white page we need to take a quick look at the logs.
If you go to /var/log/ and check your apache/nginx error log and your PHP error log, do you have any errors ?
When you get an error or a white page we need to take a quick look at the logs.
If you go to /var/log/ and check your apache/nginx error log and your PHP error log, do you have any errors ?
Hi jonathan, i should open the snipeit.error.log ?
I opened snipeIT.error.log, it came out this.
[Tue Apr 06 07:22:53.474264 2021] [php7:error] [pid 28857] [client 192.168.1.100:63900] PHP Fatal error: Uncaught ErrorException: file_put_contents(/var/www/snipeit/storage/framework/cache/cf/90/cf906e7195218453e4ff6f1bdcdc6b2d9f6cae71): failed to open stream: No such file or directory in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:133\nStack trace:\n#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()\n#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(133): file_put_contents()\n#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(74): Illuminate\Filesystem\Filesystem->put()\n#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(152): Illuminate\Cache\FileStore->put()\n#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(355): Illuminate\Cache\FileStore->forever()\n#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(418): Illuminate\Cache\Repository->forever()\n#6 /var/www/snipeit/vendor/laravel/framewor in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 133
Sorry Jonathan, i got it. it was the storage folder owner issue. I have set it to www-data. That's the reason of the error. Any idea how to change that to administrator ?
Glad to hear that you got it working. Take a look at the link below and I think you will understand how to setup a nginx + php with an "regular" user.
https://www.getpagespeed.com/server-setup/nginx-and-php-fpm-what-my-permissions-should-be
GetPageSpeedProper file permissions and ownership model for NGINX / PHP-FPM powered websites. The secure chmod and shown setup
Awesome will definitely look into it and big thanks to you for helping me on this. Have a great day and weekend ahead.
Expected Behavior (or desired behavior if a feature request)
(what you expect to happen goes here)
I was hoping my snipeit will be upgraded to 5.1.3 by running php upgrade.php
Actual Behavior
(what actually happens goes here)
It says permission issue which Im not sure what to do.
Please confirm you have done the following before posting your bug report:
Provide answers to these questions:
Is this a fresh install or an upgrade? fresh installed 5.1.1
Version of Snipe-IT you're running 5.1.1
Version of PHP you're running Current PHP version: (7.4.3) is at least 7.2.5 - continuing...
Version of MySQL/MariaDB you're running None
What OS and web server you're running Snipe-IT
Ubuntu Web Server 20.04.2 LTS
What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) using git method and some guide from youtube
There are no errors so far like stated below. Im just trying to upgrade my snipe it. I have attached the screenshot above this. Please help me take a look
storage/logs
and your webserver's logs.Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
https://snipe-it.readme.io/docs/getting-help