Pre-checks for 1.44 resulted in git modified files warning

TL;DR - After running the recommended file permissions commands for the 1.44 pre-checks, validate.php generated a number of git warnings concerning modified files.

This is an existing, working install running on CentOS7 with nginx. This is the output from validate.php prior to running the recommended pre-checks for 1.44:

====================================
Component | Version
--------- | -------
LibreNMS  | 1.43
DB Schema | 262
PHP       | 7.2.8
MySQL     | 5.5.56-MariaDB
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

I then applied the recommended chown/setfacl/chmod commands and re-ran validate.php. I then got this:

====================================
Component | Version
--------- | -------
LibreNMS  | 1.43
DB Schema | 262
PHP       | 7.2.8
MySQL     | 5.5.56-MariaDB
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        [FIX] You can fix this with ./scripts/github-remove
        Modified Files:
         bootstrap/cache/.gitignore
         logs/.gitignore
         rrd/.gitignore
         storage/app/.gitignore
         storage/app/public/.gitignore
         storage/debugbar/.gitignore
         storage/framework/cache/.gitignore
         storage/framework/sessions/.gitignore
         storage/framework/testing/.gitignore
         storage/framework/views/.gitignore
         storage/logs/.gitignore

I did consider running github-remove but that suggested it would end up deleting all these .gitignore files which is not something I’m sure would be a good thing (although I’m no git expert).

Is it safe to run github-remove or is there a better way of fixing this?

Thanks,
Matthew.

Just thought I’d update that I found a similar issue reported here and the following fixed the problem. There might be a better way of doing it but this did the trick:

cd /opt/librenms
git checkout storage       
git checkout bootstrap/cache/.gitignore
git checkout logs/.gitignore
git checkout rrd/.gitignore
chown -R librenms:librenms /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
2 Likes

I just encountered this issue as well. Did you have any fallout from the git checkout commands? I’m likely less knowledgable about git than you :smiley:

Thank you, that also helped me :smiley:
for me it was just as less important than getting the rest of the server running.