[GH-ISSUE #1747] Enable crontab #1184

Closed
opened 2026-05-05 07:37:07 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @Gimly86 on GitHub (Jan 22, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1747

Hello All,

I'm using Firejail to make SSH Jail and it work very well.
But after many search, I can't enable cron with firejail.

I don't know if it's due to blacklist file or due to permissions folder.

If anyone have enable cron ?

Thank you for your help !

Originally created by @Gimly86 on GitHub (Jan 22, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1747 Hello All, I'm using Firejail to make SSH Jail and it work very well. But after many search, I can't enable cron with firejail. I don't know if it's due to blacklist file or due to permissions folder. If anyone have enable cron ? Thank you for your help !
gitea-mirror 2026-05-05 07:37:07 -06:00
Author
Owner

@netblue30 commented on GitHub (Jan 23, 2018):

It is coming from /etc/firejail/disable-common.inc:

$ grep cron etc/*
etc/disable-common.inc:blacklist /var/spool/anacron
etc/disable-common.inc:blacklist /var/spool/cron
etc/disable-common.inc:blacklist /etc/anacrontab
etc/disable-common.inc:blacklist /etc/cron*
etc/disable-common.inc:blacklist ${PATH}/crontab

This file is included by most profiles. You basically have to comment out these lines, or to add some noblacklist statements in your specific profile before this file gets included. You can also try to handle it on the command line.:

Without noblacklist

$ firejail 
[...]
$ cat /etc/crontab
cat: /etc/crontab: Permission denied

WIth noblacklist:

$ firejail --noblacklist=/etc/cron*
[...]
$ cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
[...]
<!-- gh-comment-id:359804803 --> @netblue30 commented on GitHub (Jan 23, 2018): It is coming from /etc/firejail/disable-common.inc: ````` $ grep cron etc/* etc/disable-common.inc:blacklist /var/spool/anacron etc/disable-common.inc:blacklist /var/spool/cron etc/disable-common.inc:blacklist /etc/anacrontab etc/disable-common.inc:blacklist /etc/cron* etc/disable-common.inc:blacklist ${PATH}/crontab ````` This file is included by most profiles. You basically have to comment out these lines, or to add some noblacklist statements in your specific profile before this file gets included. You can also try to handle it on the command line.: Without noblacklist ````` $ firejail [...] $ cat /etc/crontab cat: /etc/crontab: Permission denied ````` WIth noblacklist: ````` $ firejail --noblacklist=/etc/cron* [...] $ cat /etc/crontab # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. [...] `````
Author
Owner

@Gimly86 commented on GitHub (Jan 26, 2018):

Thank you @netblue30

<!-- gh-comment-id:360731082 --> @Gimly86 commented on GitHub (Jan 26, 2018): Thank you @netblue30
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1184
No description provided.