Daily Update Fail

Hi,

The daily update script fail with these:

[root@librenms librenms]# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase FAIL
error: Your local changes to the following files would be overwritten by merge:
LibreNMS/Device/WirelessSensor.php
LibreNMS/Interfaces/ValidationGroup.php
LibreNMS/OS/Powerconnect.php
LibreNMS/Util/ModuleTestHelper.php
LibreNMS/Validator.php
composer.json
doc/API/Bills.md
doc/Alerting/Transports.md
doc/Developing/os/Wireless-Sensors.md
doc/Extensions/RRDCached-Security.md
doc/General/Changelog.md
html/api_v0.php
html/css/bootstrap-datetimepicker.min.css
html/css/styles.css
html/includes/api_functions.inc.php
html/index.php
html/js/bootstrap-datetimepicker.min.js
html/js/jquery.lazyload.min.js
html/pages/graphs.inc.php
html/pages/settings/alerting.inc.php
html/pages/validate.inc.php
includes/common.php
includes/definitions/aos-emu2.yaml
includes/definitions/ciscosb.yaml
includes/definitions/discovery/procurve.yaml
includes/definitions/kyocera.yaml
includes/discovery/functions.inc.php
includes/discovery/sensors/humidity/aos-emu2.inc.php
includes/functions.php
includes/init.php
includes/polling/applications/zfs.inc.php
includes/polling/ports.inc.php
mibs/hp/HP-ICF-OID
misc/alert_rules.json
scripts/collect-snmp-data.php
scripts/save-test-data.php
tests/OSModulesTest.php
tests/snmpsim/procurve.snmprec
tests/snmpsim/screenos.snmprec
validate.php
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
LibreNMS/Exceptions/InvalidModuleException.php
includes/discovery/arp-table/screenos.inc.php
mibs/hp/FAN-MIB
mibs/hp/POWERSUPPLY-MI
sql-schema/238.sql
tests/snmpsim/aos-emu2_ap9320.snmprec
tests/snmpsim/ciscosb_sg350-10.snmprec
Please move or remove them before you can merge.
Aborting
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
[root@librenms librenms]#

run ./scripts/github-remove -d

then run ./daily.sh

Hi,

[root@librenms librenms]# ./scripts/github-remove -d
Are you sure you want to delete all modified and untracked files? [y/N] y
Removing LibreNMS/Exceptions/InvalidModuleException.php
Removing includes/discovery/arp-table/screenos.inc.php
Removing mibs/hp/FAN-MIB
Removing mibs/hp/POWERSUPPLY-MI
Removing sql-schema/238.sql
Removing tests/snmpsim/aos-emu2_ap9320.snmprec
Removing tests/snmpsim/ciscosb_sg350-10.snmprec
[root@librenms librenms]# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase FAIL
warning: unable to unlink html/js/datetime/.gitignore: Permission denied
warning: unable to unlink html/js/datetime/.jscs.json: Permission denied
warning: unable to unlink html/js/datetime/.npmignore: Permission denied
warning: unable to unlink html/js/datetime/.travis.yml: Permission denied
warning: unable to unlink html/js/datetime/CONTRIBUTING.md: Permission denied
warning: unable to unlink html/js/datetime/Gruntfile.js: Permission denied
warning: unable to unlink html/js/datetime/LICENSE: Permission denied
warning: unable to unlink html/js/datetime/README.md: Permission denied
warning: unable to unlink html/js/datetime/bower.json: Permission denied
warning: unable to unlink html/js/datetime/build/css/bootstrap-datetimepicker.css: Permission denied
warning: unable to unlink html/js/datetime/build/css/bootstrap-datetimepicker.min.css: Permission denied
warning: unable to unlink html/js/datetime/build/js/bootstrap-datetimepicker.min.js: Permission denied
warning: unable to unlink html/js/datetime/build/nuget/Bootstrap.v3.Datetimepicker.4.0.0.nupkg: Permission denied
warning: unable to unlink html/js/datetime/build/nuget/Bootstrap.v3.Datetimepicker.CSS.4.0.0.nupkg: Permission denied
warning: unable to unlink html/js/datetime/component.json: Permission denied
warning: unable to unlink html/js/datetime/composer.json: Permission denied
warning: unable to unlink html/js/datetime/package.json: Permission denied
warning: unable to unlink html/js/datetime/src/js/bootstrap-datetimepicker.js: Permission denied
warning: unable to unlink html/js/datetime/src/less/_bootstrap-datetimepicker.less: Permission denied
warning: unable to unlink html/js/datetime/src/less/bootstrap-datetimepicker-build.less: Permission denied
warning: unable to unlink html/js/datetime/src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec: Permission denied
warning: unable to unlink html/js/datetime/src/nuget/Bootstrap.v3.Datetimepicker.nuspec: Permission denied
warning: unable to unlink html/js/datetime/src/nuget/NuGet.exe: Permission denied
warning: unable to unlink html/js/datetime/src/nuget/install.ps1: Permission denied
warning: unable to unlink html/js/datetime/tasks/bump_version.js: Permission denied
warning: unable to unlink html/js/datetime/test/publicApiSpec.js: Permission denied
warning: unable to unlink lib/jquery_lazyload/.gitignore: Permission denied
warning: unable to unlink lib/jquery_lazyload/.jshintrc: Permission denied
warning: unable to unlink lib/jquery_lazyload/CHANGELOG.textile: Permission denied
warning: unable to unlink lib/jquery_lazyload/CONTRIBUTING.md: Permission denied
warning: unable to unlink lib/jquery_lazyload/Gruntfile.js: Permission denied
warning: unable to unlink lib/jquery_lazyload/README.md: Permission denied
warning: unable to unlink lib/jquery_lazyload/bower.json: Permission denied
warning: unable to unlink lib/jquery_lazyload/disabled.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_ajax.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_background.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_container.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_fadein.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_gazillion.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_noscript.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_timeout.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_wide.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/enabled_wide_container.html: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/bmw_m1_hood.jpg: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/bmw_m1_side.jpg: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/bmw_m3_gt.jpg: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/corvette_pitstop.jpg: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/grey.gif: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/transparent.gif: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/viper_1.jpg: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/viper_corner.jpg: Permission denied
warning: unable to unlink lib/jquery_lazyload/img/white.gif: Permission denied
warning: unable to unlink lib/jquery_lazyload/jquery.lazyload.js: Permission denied
warning: unable to unlink lib/jquery_lazyload/jquery.lazyload.min.js: Permission denied
warning: unable to unlink lib/jquery_lazyload/jquery.scrollstop.js: Permission denied
warning: unable to unlink lib/jquery_lazyload/jquery.scrollstop.min.js: Permission denied
warning: unable to unlink lib/jquery_lazyload/lazyload.jquery.json: Permission denied
warning: unable to unlink lib/jquery_lazyload/package.json: Permission denied
error: unable to unlink old ‘LibreNMS/Alert/Transport/Api.php’ (Permission denied)
error: unable to create file LibreNMS/Alert/Transport/Gitlab.php (Permission denied)
error: unable to create file LibreNMS/Validations/BaseValidation.php (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Configuration.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Database.php’ (Permission denied)
error: unable to create file LibreNMS/Validations/Dependencies.php (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Disk.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/DistributedPoller.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Mail.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Php.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Poller.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Programs.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Rrd.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/RrdCheck.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/Updates.php’ (Permission denied)
error: unable to unlink old ‘LibreNMS/Validations/User.php’ (Permission denied)
error: unable to create file tests/data/aos-emu2_ap9320.json (Permission denied)
error: unable to create file tests/data/ciscosb_sg350-10.json (Permission denied)
error: unable to unlink old ‘tests/data/procurve.json’ (Permission denied)
error: unable to unlink old ‘tests/data/screenos.json’ (Permission denied)
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

You need to fix your file permissions.

chown -R librenms:librenms /opt/librenms

Hi Murrant,

Is it possible to reverse chmod for all files at ./opt/librenms ???

Thanks

What do you mean by “reverse chmod”? Murrant has given you the recursive command.