I am running macOS 10.14.5, iTerm2 build 3.2.8, tmux 2.9a (tmux -V).

I've granted both iTerm2.app and Terminal.app (file permission: .r-xr-xr-x) Full Disk Access (FDP) in Sys prefs > Security and Privacy > Privacy > Full Disk Access.

Now I am able to edit crontab using crontab -e in iTerm2 if I am not attached to a tmux session. But I still don't have the permission to edit crontab in tmux in iTerm2 (which I can in Terminal.app) even if I use sudo crontab -u username -e.

Error message:

$ crontab -e

crontab: installing new crontab
crontab: tmp/tmp.43698: Operation not permitted
crontab: edits left in /tmp/crontab.bytUnVCVVk

So is there anyway I can edit crontab in tmux in iTerm2?

Edit: Yes, granting FDP for tmux is unnecessary.

Edit: Add the comparison between Terminal and iTerm2.

  • You shouldn't need to grant any special permissions to iTerm2 or tmux to edit the crontab with crontab -e. What's the specific error message you get trying to run crontab -e from the tmux session? – Ian C. Jun 25 at 4:42
  • I think Full Disk Access is a must for macOS Mojave. Can't edit crontab and save without it. – Teddy C Jun 25 at 7:21
  • Does it work if you use Terminal.app and not iTerm2? – Ian C. Jun 27 at 16:03
  • @lan C. Yes. It works in tmux in Terminal.app, but not in iTerm2. Maybe there is some restriction user cannot go through? – Teddy C Jun 28 at 2:06
  • on my machine it's just iTerm.app, not iTerm2.app (even though it is iTerm2). I can confirm the Full Disk Access grant for iTerm2 is necessary, no need to do anything for tmux though. Are you certain you granted access to the correct program? Maybe we can take this to chat? – Ian C. Jun 29 at 4:02

You must log in to answer this question.

Browse other questions tagged .