Score:2

Cannot use command at on Ubuntu 22.04

br flag

On a relatively new instance of Ubuntu 22.04, I installed at:

sudo apt update
sudo apt install at

Now when I try to use it as a general user, I am receiving error: "You do not have permission to use at" for a general user

I found this article, which is an exact match for the error message, but references /etc/at.allow, which does not exist. File /etc/at.deny does exist but does not have this user (dennis) named within it.

In debugging, I tried adding a file /etc/at.allow, with only the desired user name in its content, as follows, and the error changed:

> sudo su -
# echo 'dennis' > /etc/at.allow
# chmod a+r /etc/at.allow
# atd restart
# exit
> at now
warning: commands will be executed using /bin/sh
Cannot open lockfile /var/spool/cron/atjobs/.SEQ: Permission denied

I found an answer for this permissions problem on StackOverflow that said permissions of that .SEQ file should be 777. I doubt that is true at all (and is instead probably a brute-force way to get around some not-understood problem), but I did try it, with the following result:

> sudo chmod 777 /var/spool/cron/atjobs/.SEQ
> echo 'ls' | at now
warning: commands will be executed using /bin/sh
job 5 at Wed May 24 21:05:00 2023
Can't signal atd (permission denied)

What else might I try to get this to work? Or what logs should I provide?

hr flag
What does "instance" mean in this context? You'd get that error if `/usr/bin/at` is not SETUID (and you'd tried to fix it by brute-forcing the .SEQ file).
Dennis  avatar
br flag
@steeldriver - In this context, instance means 'server'. I have a few installed, and only this one had that problem. Problem is solved now; There were some held packages, and because of this, apt did not do the after-work ("processing triggers"), which in this case probably was to make /usr/bin/at SETUID). After cleaning up those held packages, I did apt purge at... then apt install at. Problem went away. I have also set permissions back to the way Ubuntu left them.
Score:2
br flag

This was the result of aptitude not doing its post-installation work ("processing triggers") due to some held packages (notably, handbrake-related stuff). Once I removed the 'held' (and not needed) packages, I removed at and reinstalled:

sudo apt purge at
sudo apt install at

This solved the problem.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.