-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Upgrading issues with install.sh install #15049
Comments
👋 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. |
You'll need to create those directories and make them writable by the web server |
hmmn ok so after a fresh install it wont have those permissions? |
I mean, the install.sh should create those dirs, but it's possible on v6 we at some point didn't account for new dirs? It's possible, but if I'm not sure we'd go back and fix it at this point. Sounds like you're sorted tho? |
Debug mode
Describe the bug
I have two installs of Snipe-It production and a new server built with install.sh
when i try to run the php upgrade.php command i get permission errors.
Not writeable
i would change the permissions for Users group and owner to make all writeable
this would work until i reach here
[snipeusr@po-snipeit-svr snipeit]$ php upgrade.php
WELCOME TO THE SNIPE-IT UPGRADER!
This script will attempt to:
Launching using branch: master
Found PHP requirements, will check for PHP > 8.1.0 and < 8.4.0
Proceed with upgrade? [y/N]: y
STEP 1: Checking .env file:
√ Your APP_KEY is not blank.
√ Your APP_URL is not null or blank. It is set to http:https://po-snipeit-svr
√ Your APP_URL is set to http:https://po-snipeit-svr and starts with the protocol (https:// or http:https://)
√ Your APP_URL (http:https://po-snipeit-svr) does not have a trailing slash.
STEP 2: Checking PHP requirements: (Required PHP >=8.1.0 - <8.4.0)
√ Current PHP version: (8.2.20) is at least 8.1.0 and less than 8.4.0! Continuing...
FYI: The php.ini used by this PHP is: /etc/php.ini
Checking Required PHP extensions...
√ bcmath is installed!
√ curl is installed!
√ exif is installed!
√ fileinfo is installed!
√ gd is installed!
√ json is installed!
√ ldap is installed!
√ mbstring is installed!
√ mysqli is installed!
√ openssl is installed!
√ PDO is installed!
√ sodium is installed!
√ tokenizer is installed!
√ xml is installed!
√ zip is installed!
STEP 3: Checking directory permissions:
√ /var/www/html/snipeit/bootstrap/cache is writable
√ /var/www/html/snipeit/storage is writable
√ /var/www/html/snipeit/storage/logs is writable
√ /var/www/html/snipeit/storage/logs/laravel.log is writable
√ /var/www/html/snipeit/storage/framework is writable
√ /var/www/html/snipeit/storage/framework/cache is writable
√ /var/www/html/snipeit/storage/framework/sessions is writable
√ /var/www/html/snipeit/storage/framework/views is writable
√ /var/www/html/snipeit/storage/app is writable
√ /var/www/html/snipeit/storage/app/backups is writable
√ /var/www/html/snipeit/storage/private_uploads is writable
√ /var/www/html/snipeit/public/uploads is writable
The following directories/files do not seem writable:
✘ PERMISSIONS ERROR: /var/www/html/snipeit/storage/app/backup-temp is NOT writable
--------------------- !! ERROR !! ----------------------
Please check the permissions on the directories above and re-run this script.
------------------------- :( ---------------------------
[snipeusr@po-snipeit-svr snipeit]$ cd /var/www/html/snipeit/storage/app/
[snipeusr@po-snipeit-svr app]$ ls -l
total 0
drwxrwxrwx. 3 snipeitapp apache 43 Jun 28 05:19 backups
[snipeusr@po-snipeit-svr app]$ sudo -u snipeitapp upgrade.php
[sudo] password for snipeusr:
sudo: upgrade.php: command not found
[snipeusr@po-snipeit-svr app]$ sudo -u snipeitapp php upgrade.php
Could not open input file: upgrade.php
[snipeusr@po-snipeit-svr app]$ cd /var/www/html/snipeit/
[snipeusr@po-snipeit-svr snipeit]$ sudo -u snipeitapp php upgrade.php
WELCOME TO THE SNIPE-IT UPGRADER!
This script will attempt to:
Launching using branch: master
Found PHP requirements, will check for PHP > 8.1.0 and < 8.4.0
Proceed with upgrade? [y/N]: y
STEP 1: Checking .env file:
√ Your APP_KEY is not blank.
√ Your APP_URL is not null or blank. It is set to http:https://po-snipeit-svr
√ Your APP_URL is set to http:https://po-snipeit-svr and starts with the protocol (https:// or http:https://)
√ Your APP_URL (http:https://po-snipeit-svr) does not have a trailing slash.
STEP 2: Checking PHP requirements: (Required PHP >=8.1.0 - <8.4.0)
√ Current PHP version: (8.2.20) is at least 8.1.0 and less than 8.4.0! Continuing...
FYI: The php.ini used by this PHP is: /etc/php.ini
Checking Required PHP extensions...
√ bcmath is installed!
√ curl is installed!
√ exif is installed!
√ fileinfo is installed!
√ gd is installed!
√ json is installed!
√ ldap is installed!
√ mbstring is installed!
√ mysqli is installed!
√ openssl is installed!
√ PDO is installed!
√ sodium is installed!
√ tokenizer is installed!
√ xml is installed!
√ zip is installed!
STEP 3: Checking directory permissions:
√ /var/www/html/snipeit/bootstrap/cache is writable
√ /var/www/html/snipeit/storage is writable
√ /var/www/html/snipeit/storage/logs is writable
√ /var/www/html/snipeit/storage/logs/laravel.log is writable
√ /var/www/html/snipeit/storage/framework is writable
√ /var/www/html/snipeit/storage/framework/cache is writable
√ /var/www/html/snipeit/storage/framework/sessions is writable
√ /var/www/html/snipeit/storage/framework/views is writable
√ /var/www/html/snipeit/storage/app is writable
√ /var/www/html/snipeit/storage/app/backups is writable
√ /var/www/html/snipeit/storage/private_uploads is writable
√ /var/www/html/snipeit/public/uploads is writable
The following directories/files do not seem writable:
✘ PERMISSIONS ERROR: /var/www/html/snipeit/storage/app/backup-temp is NOT writable
--------------------- !! ERROR !! ----------------------
Please check the permissions on the directories above and re-run this script.
------------------------- :( ---------------------------
[snipeusr@po-snipeit-svr snipeit]$
i'm now stuck on another permission issue
and this is for the new server not the old one i would rather upgrade as it has my entire database.
also this new v7 does not let me import anything with error 500
The /var/www/html/snipeit/bootstrap/cache directory must be present and writable
Reproduction steps
2php upgrade.php
3.sudo -u snipeitapp php upgrade.php
...
Expected behavior
upgrade to latest v7.0.7
able to upload from a fresh install without error 500 or permissions issues.
Screenshots
No response
Snipe-IT Version
7.0.6
Operating System
almalinux
Web Server
apache
PHP Version
8.2.20
Operating System
Windows 11 Enterprise
Browser
opera
Version
111.0.5168.55
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
its a fresh install twice on a VM
tried upgrading and importing content since the main server also has issues upgrading.
The text was updated successfully, but these errors were encountered: