{"id":3112,"date":"2020-03-16T11:32:40","date_gmt":"2020-03-16T16:32:40","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3112"},"modified":"2020-03-16T11:42:59","modified_gmt":"2020-03-16T16:42:59","slug":"librenms-validate-sh-some-folders-have-incorrect-file-permissions-this-may-cause-issues","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/librenms-validate-sh-some-folders-have-incorrect-file-permissions-this-may-cause-issues\/","title":{"rendered":"LibreNMS .\/validate.sh &#8211; Some folders have incorrect file permissions, this may cause issues."},"content":{"rendered":"\n<p><em>Helpful article here. <a href=\"https:\/\/wifitechtalk.com\/librenms-permissions-error\/\">https:\/\/wifitechtalk.com\/librenms-permissions-error\/<\/a><\/em><\/p>\n\n\n\n<p>When running the following command,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo \/opt\/librenms\/validate.sh<\/pre>\n\n\n\n<p>I&#8217;ve been getting the following errors.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[FAIL]  Some folders have incorrect file permissions, this may cause issues.\n    [FIX]: \n    sudo chown -R librenms:librenms \/opt\/librenms\n    sudo setfacl -d -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/\n    sudo chmod -R ug=rwX \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/\n    Files:\n     \/opt\/librenms\/storage\/framework\/views\/adc52b677409cdba8d8e89dc<\/pre>\n\n\n\n<p>You can run the commands and fix the problem, but they pop up later and it does the same thing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create Script to fix permissions<\/h2>\n\n\n\n<p>Work around is to have a script run these commands every few minutes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/root\/librenms_fix_permissions.sh<\/pre>\n\n\n\n<p>Add the following<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash \nsudo chown -R librenms:librenms \/opt\/librenms \nsudo setfacl -d -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/ \nsudo chmod -R ug=rwX \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/<\/pre>\n\n\n\n<p>Make the script executable<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo chmod +x librenms_fix_permissions.sh<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Add to Crontab<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo crontab -e <\/pre>\n\n\n\n<p>Add the following entry to Cron to run every 30 minutes<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">*\/30 * * * * \/root\/librenms_fix_permissions.sh<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Helpful article here. https:\/\/wifitechtalk.com\/librenms-permissions-error\/ When running the following command, sudo \/opt\/librenms\/validate.sh I&#8217;ve been getting the following errors. [FAIL] Some folders have incorrect file permissions, this may cause issues. [FIX]: sudo chown -R librenms:librenms \/opt\/librenms sudo setfacl -d -m g::rwx \/opt\/librenms\/rrd &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/librenms-validate-sh-some-folders-have-incorrect-file-permissions-this-may-cause-issues\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[352],"tags":[33,655,353,941],"class_list":["post-3112","post","type-post","status-publish","format-standard","hentry","category-librenms","tag-crontab","tag-error","tag-librenms","tag-validate-sh"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3112"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3112\/revisions"}],"predecessor-version":[{"id":3115,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3112\/revisions\/3115"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}