I've configured chrooted SSH user on CentOS 7. Mounted /proc, /dev, /dev/pts to the user and installed required packages. And now I want to allow cron jobs for this user. How can I solve the task?
Server:
[root@localhost admin]# grep sftpuser /etc/passwd
sftpuser:x:1004:1003::/chrooted/dir:/bin/bash
[root@localhost admin]# id -a sftpuser
uid=1004(sftpuser) gid=1003(sftpuser) groups=1003(sftpuser),50(ftp)
[root@localhost admin]# uname -a
Linux localhost.localdomain 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
/etc/ssh/sshd_config:
...
Subsystem sftp internal-sftp
Match Group sftpuser
ChrootDirectory %h
AllowTcpForwarding no
X11Forwarding no
...
Client:
-bash-4.2$ crontab -e
You (sftpuser) are not allowed to use this program (crontab)