snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.86k stars 3.14k forks source link

Incorrect right for log folder in docker-compose #14091

Closed Decode1415 closed 8 months ago

Decode1415 commented 8 months ago

Debug mode

Describe the bug

With the default docker-compose installation, the logs folder is not owned by apache:apache and it causes a permission error. during the installation setup.

# ls -al
total 44
drwxrwxr-x    1 apache   apache        4096 Jan  3 20:47 .
drwxr-xr-x    1 apache   apache        4096 Jan  3 20:47 ..
drwxrwxr-x    1 apache   apache        4096 Jan  3 20:47 app
drwxrwxr-x    1 apache   apache        4096 Dec 24 20:14 debugbar
drwxrwxr-x    1 apache   apache        4096 Dec 24 20:14 framework
drwxrwxr-x    2 1000   1000          4096 Dec 24 20:14 logs
lrwxrwxrwx    1 apache   root            39 Jan  3 20:47 oauth-private.key -> /var/lib/snipeit/keys/oauth-private.key
lrwxrwxrwx    1 apache   root            38 Jan  3 20:47 oauth-public.key -> /var/lib/snipeit/keys/oauth-public.key
lrwxrwxrwx    1 apache   root            37 Jan  3 20:47 private_uploads -> /var/lib/snipeit/data/private_uploads

In ordre to fix the issue, I added one line in the Docker.alpine file :

RUN chown -hR apache:apache /var/www/html/storage/logs

Reproduction steps

please see bug report, everything is there

Expected behavior

please see bug report, everything is there

Screenshots

https://github.com/snipe/snipe-it/blob/master/docker-compose.yml

Snipe-IT Version

Current docker-compose.yaml file

Operating System

Ubuntu 22.04

Web Server

docker-compose // alpine

PHP Version

no idea, but that is not relevant to the issue

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 8 months 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.

snipe commented 8 months ago

Thanks - we'd be happy to take a PR for this

Decode1415 commented 8 months ago

@snipe I must admit my sheer ignorance of the PullRequest process, I even searched on Google to know what "PR" means in a context of software development.

I understand that I have to do that myself, and when I click on "Pull Request", it ask me to compare two branch of the code, but what is the logic behind this, I've to compre what with what, and why?

(Sorry for the question, I'm willing to help the proper way, I just do not know what to do)

Decode1415 commented 8 months ago

@snipe Alright, I think (hope) I did the right thing, we will see! https://github.com/snipe/snipe-it/pull/14098

snipe commented 8 months ago

You did :) Thanks!

Decode1415 commented 8 months ago

@snipe In fact, sadly, I closed the PR myself with out implementing it, then I try to do another PR but failed. So honestly, at this point, if you find my contribution valide, I hope you could add it yourself, as it will probably take you 7 or 8 seconds. Sorry/thank you!