Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'/usr/libexec/netdata/plugins.d' # : Permission denied #1292

Closed
DardBrinza opened this issue Nov 28, 2016 · 14 comments · Fixed by #1294
Closed

'/usr/libexec/netdata/plugins.d' # : Permission denied #1292

DardBrinza opened this issue Nov 28, 2016 · 14 comments · Fixed by #1294
Labels

Comments

@DardBrinza
Copy link

After installing netdata, it is not included. The status of the error.

root@host:~# service netdata status -l
● netdata.service - Real time performance monitoring
   Loaded: loaded (/etc/systemd/system/netdata.service; enabled)
   Active: failed (Result: exit-code) since Sun 2016-11-27 22:32:05 MSK; 20h ago
  Process: 21839 ExecStart=/usr/sbin/netdata -D (code=exited, status=1/FAILURE)
 Main PID: 21839 (code=exited, status=1/FAILURE)

Nov 27 22:32:05 host175 netdata[21839]: 2016-11-27 22:32:05: netdata: FATAL: Cannot cd to directory '/usr/libexec/netdata/plugins.d' # : Permission denied
Nov 27 22:32:05 host175 systemd[1]: netdata.service: main process exited, code=exited, status=1/FAILURE
Nov 27 22:32:05 host175 systemd[1]: Unit netdata.service entered failed state.
Nov 27 22:32:05 host175 netdata[21839]: 2016-11-27 22:32:05: netdata: INFO: Saving database...
Nov 27 22:32:05 host175 netdata[21839]: 2016-11-27 22:32:05: netdata: INFO: NetData exiting. Bye bye...

@gmorain
Copy link

gmorain commented Nov 28, 2016

I have the same issue.

I tried to uninstall / reinstall several times, sudo / non sudo mode, in default directory or other directory, but always the same result.

install script is unable to download configuration file, but says 'OK. NetData is installed and it is running.', even if service netdata status says otherwise.

I'm no expert, but can help if directed how to collect relevant logfiles

(Debian Jessie updated minutes before the attempt to install netdata)

@marko8904
Copy link

marko8904 commented Nov 28, 2016

Seeing the same issue. Seems the recent change modifying global readability affects /usr/libexec and /etc/netdata folders if they are created by netdata installer. They are being created with 770 permissions. You can fix the problem manually by
chmod a+rX /usr/libexec
and
chmod a+rX /etc/netdata

The first one will enable all plugins again. The second one will let netdata read its own config files.

@alibo
Copy link
Contributor

alibo commented Nov 28, 2016

Also, I think you should change owner of /usr/libexec/netdata from root:root to netdata:netdata by

sudo chown -R netdata:netdata /usr/libexec/netdata/

Edit 1:

Another change!

sudo chmod 0755 /usr/share/netdata/

Edit 2:

sudo chmod -R 0775 /var/cache/netdata/

@simon021
Copy link

After executing all suggestions including Alibo's, I am left with this when trying to start netdata

netdata
2016-11-28 13:06:51: netdata: ERROR: Cannot open file '/etc/netdata/netdata.conf' (errno 13, Permission denied)
2016-11-28 13:06:51: netdata: FATAL: Cannot cd to directory '/var/cache/netdata' # : Permission denied

2016-11-28 13:06:51: netdata: INFO: Saving database...
2016-11-28 13:06:51: netdata: INFO: NetData exiting. Bye bye...

Seems like the permissions are still not correct

@marko8904
Copy link

@simon021 see my comment above @alibo's. You need to apply permissions change on /etc/netdata as well (sudo chmod a+rX /etc/netdata)

@simon021
Copy link

simon021 commented Nov 28, 2016

edit: Did a fresh install and added the listed commands in this thread

sudo chmod a+rX /usr/libexec
sudo chmod a+rX /etc/netdata
sudo chown -R netdata:netdata /usr/libexec/netdata/
sudo chmod 0755 /usr/share/netdata/
sudo chmod -R 0775 /var/cache/netdata/

it came right up and is working great now.

Thanks!

@DardBrinza
Copy link
Author

Thank you guys, it works.

ktsaou added a commit to ktsaou/netdata that referenced this issue Nov 28, 2016
@ktsaou
Copy link
Member

ktsaou commented Nov 28, 2016

my fault guys.
I changed the default umask of the installer to 007 and all the directories indirectly created were not world-readable. I changed it back to 002.

I am testing now the other permissions, because there should not be a problem with them...

@gmorain
Copy link

gmorain commented Nov 28, 2016

Hi ktsaou, I've just done the following :

$ sudo ./netdata-uninstaller.sh --force
$ git pull
$ nano netdata-installer.sh # to ensure that umask is 002
$ sudo ./netdata-installer.sh
$ sudo service netdata status

and netdata service is now active.
I still have to check that everything works as intended since it's my first install of this tool, and I am currently accessing the machine remotely, but at least the installation part seems now ok !

@ktsaou
Copy link
Member

ktsaou commented Nov 28, 2016

ok. did a fresh install and yeap, this was it.

I also fixed the directories indirectly and incorrectly created by the wrong umask.
It should be ok now.

merged the fix.

@ktsaou
Copy link
Member

ktsaou commented Nov 28, 2016

Just pull the repo again and run the installer.
It should fix the wrong permissions.
Please report back success or failure.

@simon021
Copy link

confirming the fix worked.
Thank you all very much.

@ktsaou
Copy link
Member

ktsaou commented Nov 28, 2016

nice! (and sorry guys...)

@gmorain
Copy link

gmorain commented Nov 28, 2016

Hi,

just forced a reinstall after a git pull, and it works (Debian Jessie)

Thanks for the fix !

vkalintiris pushed a commit to vkalintiris/netdata that referenced this issue Dec 13, 2023
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants