Can't upgrade SnipeIt #14583
Unanswered
BananamanCoolDude
asked this question in
Q&A
Replies: 1 comment
-
You should change the ownership as following Once done you should have no permission issues. Kind Regards |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can't upgrade SnipeIt. Permissions denied, even thought permissions enabled?
`
administrator@appsrv003:~$ cd /var/www/snipe-it
administrator@appsrv003:/var/www/snipe-it$ sudo chown -R www-data:www-data ./storage
administrator@appsrv003:/var/www/snipe-it$ sudo chmod -R 755 ./storage
administrator@appsrv003:/var/www/snipe-it$
administrator@appsrv003:/var/www/snipe-it$ sudo chmod -R 755 ./storage
administrator@appsrv003:/var/www/snipe-it$
administrator@appsrv003:/var/www/snipe-it$ php upgrade.php
WELCOME TO THE SNIPE-IT UPGRADER!
This script will attempt to:
STEP 1: Checking PHP requirements:
Current PHP version: (7.4.3-4ubuntu2.20) is at least 7.2.5 - continuing...
FYI: The php.ini used by this PHP is: /etc/php/7.4/cli/php.ini
Checking Required PHP extensions...
√ bcmath is installed!
√ curl 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!
√ tokenizer is installed!
√ xml is installed!
√ zip is installed!
STEP 2: Backing up database:
-- Starting backup...
Backup failed because: mkdir(): Permission denied.
STEP 3: Putting application into maintenance mode:
-- Failed to enter maintenance mode.
file_put_contents(/var/www/snipe-it/storage/framework/down): failed to open stream: Permission denied
STEP 4: Pulling latest from Git (master branch):
Git is installed.
fatal: detected dubious ownership in repository at '/var/www/snipe-it'
To add an exception for this directory, call:
fatal: detected dubious ownership in repository at '/var/www/snipe-it'
To add an exception for this directory, call:
fatal: detected dubious ownership in repository at '/var/www/snipe-it'
To add an exception for this directory, call:
fatal: detected dubious ownership in repository at '/var/www/snipe-it'
To add an exception for this directory, call:
Step 5: Cleaning up old cached files:
√ No bootstrap/cache/compiled.php, so nothing to delete.
√ No bootsrap/cache/services.php, so nothing to delete.
√ No bootstrap/cache/config.php, so nothing to delete.
-- Configuration cache cleared!
-- Failed to clear cache. Make sure you have the appropriate permissions.
-- Route cache cleared!
-- Compiled views cleared!
Step 6: Updating composer dependencies:
(This may take a moment.)
√ Local composer.phar detected, so we'll use that.
-- Updating local composer.phar
[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: "/var/www/snipe-it/composer.phar" could not be writ
ten.
rename(/home/administrator/.cache/composer/composer-temp5580118.phar,/var/w
ww/snipe-it/composer.phar): Permission denied
self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--1] [--2] [--set-channel-only] [--] []
Upgrading to version 2.7.2 (stable channel).
[ErrorException]
file_put_contents(/var/www/snipe-it/vendor/composer/installed.php): failed
to open stream: Permission denied
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] []...
Generating optimized autoload files
Generated optimized autoload files containing 6146 classes
Step 7: Migrating database:
Nothing to migrate.
Step 8: Checking for OAuth keys:
√ OAuth keys detected. Skipping passport install.
Step 9: Taking application out of maintenance mode:
-- Application is already up.
---------------------- FINISHED! -----------------------
All done! Clear your browser cookies and re-login to use
your upgraded Snipe-IT!
administrator@appsrv003:/var/www/snipe-it$ artisan cache:clear
artisan: command not found
`
Is it permissions or i'm missing something. I recently upgraded from Ubuntu 18.04 to Ubuntu 20.04 could it cause this?
Beta Was this translation helpful? Give feedback.
All reactions