Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:19
    sanjay900 opened #8825
  • 02:54
    sanjay900 opened #8824
  • 02:52
    dhkivan commented #8793
  • 01:47
    sanjay900 opened #8823
  • Nov 26 20:27
    snipe commented #8822
  • Nov 26 17:22
    Jannik2017 commented #8816
  • Nov 26 16:53
    snipe commented #8816
  • Nov 26 16:39
    snipe commented #3680
  • Nov 26 15:50
    Jannik2017 commented #8816
  • Nov 26 15:16
    Blupfis commented #8607
  • Nov 26 15:07
    SjamonDaal commented #8607
  • Nov 26 15:02
    klaveczky commented #3680
  • Nov 26 14:35
    rickvandersterren commented #8607
  • Nov 26 13:39
    bvivi57 closed #8822
  • Nov 26 13:39
    bvivi57 commented #8822
  • Nov 26 13:37
    dvente commented #6207
  • Nov 26 13:19
    thumperest commented #8804
  • Nov 26 12:55
    dvogelho closed #8798
  • Nov 26 12:55
    dvogelho commented #8798
  • Nov 26 12:51
    sdecaux commented #5333
Yosi
@yosiasz
@eppela its a feature that has been requested in the past, not sure if it has been implemented. snipe/snipe-it#8102
samotelf
@samotelf
yellow!
samotelf
@samotelf

regarding snipe/snipe-it#8750 any love?
I've edited the original script to install php 7.4 and all goes well.
however, the login page appears blank.

I fixed it by issuing:
sudo chown -R apache:apache /var/www/html/snipeit
sudo chmod -R 755 storage/
sudo chmod -R 755 public/uploads

But why? if the user that script uses "snipeitapp" belongs to the apache group?

The original script is here:
https://snipe-it.readme.io/docs/downloading

I replaced the following:
echo "* Adding IUS, epel-release and MariaDB repositories."
log "yum -y install wget epel-release yum-utils"

#log "yum -y install https://centos7.iuscommunity.org/ius-release.rpm"
#log "rpm --import /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY"
log "yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm"
log "yum-config-manager --enable remi-php74"

echo "* Installing Apache httpd, PHP, MariaDB and other requirements."
#PACKAGES="httpd mariadb-server git unzip php71u php71u-mysqlnd php71u-bcmath php71u-cli php71u-common php71u-embedded php71u-gd php71u-mbstring php71u-mcrypt php71u-ldap php71u-json php71u-simplexml php71u-process"
PACKAGES="httpd mariadb-server git unzip php php-mysqlnd php-bcmath php-mcrypt php-gd php-curl php-mysql php-mbstring php-ldap php-xml php-zip php-posix"
Yosi
@yosiasz
@samotelf so you are good now? it is working?
samotelf
@samotelf
@yosiasz It was lways working.

@yosiasz my production env is always working :)
although I'm always trying to contribute, and maybe migrate my prod environment since the first time it was installed manually.
For the purpose of others I was just trying to install clean using the script provided by:

Snipe-It Install Script
Script created by Mike Tucker
mtucker6784@gmail.com

In CentOS 7 with php 7.4.

Screenshot 2020-11-26 at 18.42.22.png
everything went well.
now if i try to visit.
samotelf
@samotelf

blank page with error:

file_put_contents(/var/www/html/snipeit/storage/framework/cache/cf/90/cf906e7195218453e4ff6f1bdcdc6b2d9f6cae71): failed to open stream: Permission denied

this did not happened before using the script.
Screenshot 2020-11-26 at 18.46.22.png
so if i do a ls -la /var/www/html/snipeit the permissions are correct
so now ill do a:
sudo chmod -R 755 storage/
sudo chmod -R 755 public/uploads
no, i will not
samotelf
@samotelf
becasue its already 775 wich means the group apache can write it, and the user snipeitapp is inside apache.
is this that i dont understand
[root@localhost snipeit]# cat /etc/group | grep snipeitapp
apache:x:48:snipeitapp
snipeitapp:x:1000:
[root@localhost snipeit]#
where am i being a dumbass?
samotelf
@samotelf
exactly:
it only works when i do a sudo chown -R apache:apache /var/www/html/snipeit
no me gusta
Yosi
@yosiasz
ok @samotelf let's take it from the top. Help me help you.
You are trying to to install a clean snipeit using a script provided by MIke Tucker?
samotelf
@samotelf
@yosi I am, but the script is deprecated.
Yosi
@yosiasz
so why are you using it :)
samotelf
@samotelf
so I changed the script.
Yosi
@yosiasz
ah, got it you are trying to fix it up so that others can use it
samotelf
@samotelf
because i want to fix the script to help others
yes.
Yosi
@yosiasz
:clap:
where is this script at now? I can take a look
samotelf
@samotelf
i was here before in snipeit forum, I even got an user testimony mention, albeit with other name
sure
here:
wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh
chmod 744 install.sh
./install.sh
the install .sh will download the snipeit.sh
Take a look at line 655 to 668
I replaced it with this:
`echo "* Adding IUS, epel-release and MariaDB repositories."
log "yum -y install wget epel-release yum-utils"
#log "yum -y install https://centos7.iuscommunity.org/ius-release.rpm"
#log "rpm --import /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY"
log "yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm"
log "yum-config-manager --enable remi-php74"

echo "* Installing Apache httpd, PHP, MariaDB and other requirements."
#PACKAGES="httpd mariadb-server git unzip php71u php71u-mysqlnd php71u-bcmath php71u-cli php71u-common php71u-embedded php71u-gd php71u-mbstring php71u-mcrypt php71u-ldap php71u-json php71u-simplexml php71u-process"
PACKAGES="httpd mariadb-server git unzip php php-mysqlnd php-bcmath php-mcrypt php-gd php-curl php-mysql php-mbstring php-ldap php-xml php-zip php-posix"
install_packages`
samotelf
@samotelf
basically, I just install yum-utils and add the repo for php 7.4

if you look at the script you will see that he does set permissions in line 220:

echo "* Setting permissions." for chmod_dir in "$APP_PATH/storage" "$APP_PATH/public/uploads"; do chmod -R 775 "$chmod_dir" done

and in line 225 makes the direcroy owned by snipeitapp:apache
so far so good
what puzzles me is that this work in the past, i remember this working.
now, it will only work if I chown -R apache:apache /var/www/html/snipeit
maybe a preciosism but wouldnt it be better to be owner:group instead of group:group?
bathroom brb :)
samotelf
@samotelf
back
@yosiasz your 2 cents please?
Yosi
@yosiasz
sorry, got distracted by something else.
samotelf
@samotelf
np :)
samotelf
@samotelf

@yosiasz i'll have to leave.
I'll be back later.

In conclusion: There's something wrong with permissions.
Maybe leaving with apache:apache it's not so bad.
My prod env is like that.
dinner time.
see you.

Yosi
@yosiasz
ok boss, enjoy dinner
samotelf
@samotelf
@yosiasz any news?
Yosi
@yosiasz
4 hour dinner?
Ok my turn now