Potential install.sh improvement for Ubuntu
Please confirm you have done the following before posting your bug report:
- [No] I have enabled debug mode
Describe the bug After a fresh install, when backing up via Admin Settings, the browser presents the message "Whoops, looks like something went wrong.". However, the backup is generated and available at the next access to Admin Settings. Looking at the directories, it turns out that the install script generated most of the files and directories with the owner snipeitapp, but also some with the owner www-data. For example:
I have little experience with web servers, so it's possible that I did something wrong (sorry if it's the case 😊 ). Anyway, I thought it might be useful to inform, for the possibility to improve the script. My thought would be that lines 224 and 227 are being executed without using run_as_app_user function.
(UPDATE: doing sudo chown -R snipeitapp:www-data /var/www/snipeit/storage/ didn't solve the problem either, but sudo chown -R snipeitapp:www-data /var/www/snipeit/ solved)
To Reproduce Steps to reproduce the behavior:
- Install Ubuntu 18.04.3 LTS
- Install Snipe-IT through install.sh: 2.1. wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh 2.2. chmod 744 install.sh 2.3. ./install.sh
- Go to Admin Settings → Generate Backup
Expected behavior Not show error on backup through Admin Settings.
Server:
- Snipe-IT Version: v4.7.8 - build 4170 (master)
- OS: Ubuntu 18.04.3 LTS
- Web Server: Apache/2.4.29 (Ubuntu)
- PHP Version: PHP 7.2.24-0ubuntu0.18.04.1 (cli) (built: Oct 28 2019 12:07:07)
Error Messages
- Browser: "Whoops, looks like something went wrong."
Additional context
- This is only a fresh install through install.sh.
I have the same problem
Somehow related is also the issue of using php upgrade.php after installing Snipe-IT via the install.sh script, just because of the snipeitapp user, which doesn't have privileges to write in .git. (#7699)
I'd wish there were clear instructions about that in the Documentation, how the upgrade the instance after using install.sh.
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
Yes, please. It is still relevant. Thank you.
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.