I think about doing something like:sudo ln -s ~/myCustomCrontab /var/spool/cron/crontabs/usernamebecause I'd like to have all customized files in my home directory. Possible risks I can think of aresecurity (How should the permissions be to still be secure?)system failureOr is there a better way to keep track of the file?
Is it evil to link to a crontab?
security;cron;symlink;failure
This does not work, at least in Debian-like systems (symlinked or hardlinked crontab files for (not-system) users are ignored at all).It also fails if you use crontab to change your crontab file. If the cron version still accepts symlinked crontab files, it creates possible security holes as the crontab file is not checked anymore for consistency.With your symlink solution, crontab -e crashes if you (or some install script) changes the crontab file:crontab: crontabs/username: rename: Operation not permittedas it moves a temporary file to /var/spool/cron/crontabs/usernameto replace the old file instantaneously.crontab has a lot of additional security checks built in such thatthe cron system cannot be used to compromise the system. It checks for example the content of the cron file before installing or changing it. A invalid cronfile may crash the cron daemon or could (at least theoretically) misuse it to gain more privileges on the system.With your solution, there is no check anymore for the crontab file.