/var/spool/cron: No such file or directory

msok20

Verified User
Joined
Sep 22, 2020
Messages
36
Hello,

I do not have the /var/spool and /var/spool/cron directory visible
even though these directories exist and are visible from admin and root, and there are directories with my user name.

I have cron permissions, but I cannot perform the installation of the module via magento. I get this message;

magento-user$ bin/magento cron:install
Error during saving of crontab: /var/spool/cron: No such file or directory
/var/spool/cron: mkdir: No such file or directory
 
3+ years later, still happening

this appears to be a jailshell error, only happening when users are in a jailed shell
Jailed shell:
[Load: 0.47] [Time: 16:15:24]
[user@host ~]: crontab -e
/var/spool/cron: No such file or directory

Not so jailed shell:
[Load: 0.19] [Time: 16:18:38]
[user@host ~]: crontab -e
GNU nano 6.2 /tmp/crontab.YpCa3B/crontab
#direct_crons enabled. Safe to edit this file. DirectAdmin will update accordingly.
MAILTO=""
PATH=/usr/local/php81/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/username/bin

Obviously, this is one of those "'we don't care about it" bugs that DA doesn't plan on fixing.
 
Seems your calculator is off. December 2024 - October 2022 is 2 years, not 3. :D

Odd tho that until now in these 2 years only 3 people reported it.

3 years ;) . 2 years since the last reply, but 3 years since this was opened

I've noticed it myself multiple times in that period, always forget this is an issue, which it is.

Apparently jailshell users are not too cron friendly?
 
Yes you're right, 3 years from the first report. :)

Apparently jailshell users are not too cron friendly?
I don't know, maybe. Or maybe too little shell users have jailshell active.

However, might be a jailshell OS issue, seems not only related to DA if I'm going to look for it.

Found the same reported last year here on DA but also here on Centos Webpanel and even here and here on cPanel.
They had a command as solution on Centos webpanel, but looks a bit like normal behaviour in a jailed shell, at least the issue is not limited to DA.
 
It's working as designed.
most of us, for normal users, don't edit cron via cli.

if it really need to edit via CLI, just using "root".
 
It's working as designed.
most of us, for normal users, don't edit cron via cli.

if it really need to edit via CLI, just using "root".
No, it is not "working as designed".

"Working as designed" means that the system allows the user to edit a cron job... NOT through some ridiculous GUI, but as the system DESIGNED it to. Through SSH

Recommending 'root' users do anything like editing a user's cron just shows a level of ignorance I haven't seen in , well years. That's not the root user's job to do.
 
I had a ticket about this with DA some time ago, and they have decided against allowing jailed shells this access. The reasoning is that crontab is setgid, and by allowing raw edits of the crontab file, they would be able to adjust the SHELL= value, and thus break out of their jailed shell.
 
Back
Top