do-agent icon indicating copy to clipboard operation
do-agent copied to clipboard

do-agent does not start on CentOS v7

Open sdwru opened this issue 4 years ago • 6 comments

To Reproduce

Install the latest do-agent from yum repository. Run journalctl -f to watch systemd logging in real time. From another shell run systemctl restart do-agent

You will see the following error in the journalctl shell:

Failed at step EXEC spawning /opt/digitalocean/bin/do-agent --syslog: Permission denied

To Fix

chmod 755 /opt/digitalocean
chmod 755 /opt/digitalocean/bin

Run systemctl restart do-agent again and it should work now

sdwru avatar Oct 20 '21 19:10 sdwru

Hi @sdwru, I just tried re-producing this with a CentOS v7 droplet and was unable too. Are you using the actual DO image for this distro or a custom image?

bsnyder788 avatar Oct 21 '21 10:10 bsnyder788

Hello,

This may have been due to a change to the RPM, which used to set the file and folder permissions to user:nobody, group:do-agent, and permissions 750. Or perhaps the droplet-agent did that? When the RPM was updated it appears it did not update the previous file and folder permissions on my server. After I completely uninstalled do-agent and droplet-agent and removed the /opt/digitalocean folder and tried re-installed both RPMs individually they both set the permissions correctly.

So it seems to be working now for new installs. However, I think it would still be advisable to have the RPM update folder/file permissions on updates, for anyone who may still be running older versions of the RPM and have not updated yet.

sdwru avatar Oct 21 '21 13:10 sdwru

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jan 08 '22 22:01 stale[bot]

still valid

bsnyder788 avatar Jan 10 '22 15:01 bsnyder788

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 16 '22 05:04 stale[bot]

still valid

bsnyder788 avatar Apr 16 '22 07:04 bsnyder788