Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';不能通过SSH保存到crontab,但可以在本地登录时保存_Ssh_Cron_Macos Big Sur - Fatal编程技术网

Can';不能通过SSH保存到crontab,但可以在本地登录时保存

Can';不能通过SSH保存到crontab,但可以在本地登录时保存,ssh,cron,macos-big-sur,Ssh,Cron,Macos Big Sur,我有一个远程无头服务器(MacOS BigSur 11.3.1)。当我通过ssh(root用户或普通用户)登录时,我无法保存到crontab 当我使用以下命令时: % crontab -e 我可以看到我在本地登录(而不是通过ssh)时保存的cronjob。编辑并退出crontab后,我得到以下错误: crontab: installing new crontab crontab: tmp/tmp.1028: Operation not permitted crontab: edits left

我有一个远程无头服务器(MacOS BigSur 11.3.1)。当我通过ssh(root用户或普通用户)登录时,我无法保存到crontab

当我使用以下命令时:

% crontab -e
我可以看到我在本地登录(而不是通过ssh)时保存的cronjob。编辑并退出crontab后,我得到以下错误:

crontab: installing new crontab
crontab: tmp/tmp.1028: Operation not permitted
crontab: edits left in /tmp/crontab.kKYx3tt4c1
在登录ssh时,我尝试使用以下命令编辑crontab:

% sudo crontab -e
令我惊讶的是,我在本地登录时保存的cronjob没有列出。对于不同的用户来说,这就像是一个不同的crontab。无论如何,在使用sudo时,我也无法保存到crontab。它给出了与上述完全相同的误差

我听从了一些互联网帖子的建议,建议允许cron和sshd可执行文件通过Mac系统首选项进行“全磁盘访问”。但是,同样的错误仍然存在


我不确定下一步要尝试什么。

因此,通过给予sshd-keygen-wrapper完整的磁盘访问权限,问题得到了解决。别问我为什么需要它,但它现在起作用了。我希望这能帮助任何有同样问题的人