snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Potential install.sh improvement for Ubuntu

Open miniexplorer opened this issue 7 years ago • 7 comments

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:

screenshot

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:

  1. Install Ubuntu 18.04.3 LTS
  2. 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
  3. 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.

miniexplorer avatar Nov 15 '19 15:11 miniexplorer

I have the same problem

StantonSmall avatar Nov 21 '19 08:11 StantonSmall

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.

tdkl avatar Jan 04 '20 10:01 tdkl

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!

stale[bot] avatar Mar 04 '20 11:03 stale[bot]

Yes, please. It is still relevant. Thank you.

miniexplorer avatar Mar 06 '20 17:03 miniexplorer

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!

stale[bot] avatar Mar 06 '20 17:03 stale[bot]

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!

stale[bot] avatar May 06 '20 02:05 stale[bot]

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.

stale[bot] avatar May 13 '20 05:05 stale[bot]