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

master deployment: 'the user jenkins-agent cannot use this program (crontab)' #187

Open
gavanderhoorn opened this issue Jan 27, 2018 · 6 comments

Comments

@gavanderhoorn
Copy link
Contributor

At some point during a master deployment, the following message was printed on the console:

The user jenkins-agent cannot use this program (crontab)

Haven't checked yet where this is coming from.

Interestingly: I've only seen this on this particular host, but afaict, it's the same Ubuntu Server 16.04 amd64 as I've used for all other deployments the past two weeks.

crontab is present on the system, so perhaps it's a permission thing.

@gavanderhoorn
Copy link
Contributor Author

gavanderhoorn commented Jan 29, 2018

repo deployments now also seem to run into this.

Some googling suggests this is a permission issue (this SE post fi): regular users are not allowed access to crontab, unless they are listed in /etc/cron.allow, which doesn't exist is empty on the VMs I deploy to.

Adding jenkins-agent to it made the repo deployment succeed.

@nuclearsandwich: are the EC2 instances you deploy to setup differently? Should we add jenkins-agent to /etc/cron.allow with puppet?

@gavanderhoorn
Copy link
Contributor Author

gavanderhoorn commented Jan 29, 2018

Even after adding `jenkins-agent` to `cron.allow`, I get during deployment:
The user jenkins-agent cannot use this program (crontab)

after su - jenkins-agent, crontab -l returns no crontab for jenkins-agent.

The puppet run is successful though, which is strange, seeing as the crontab doesn't appear to have actually been created.

@gavanderhoorn
Copy link
Contributor Author

gavanderhoorn commented Jan 29, 2018

Adding jenkins-agent to /etc/cron.allow seems to resolve all issues.

On master, this is not such a problem, as the user for the cronjob is root, which is always allowed to interact with cron. We do get the warning though.

@gavanderhoorn
Copy link
Contributor Author

See #189 for a potential fix.

@RonaldEnsing
Copy link

I had the same issue on Ubuntu Server 16.04. Adding jenkins-agent to /etc/cron.allow worked for me as well.

@gavanderhoorn
Copy link
Contributor Author

gavanderhoorn commented Oct 19, 2018

@RonaldEnsing: removing the /etc/cron.allow file (as mentioned in #189 (comment)) should also 'fix' this.

See #189 in general for some more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants