cron<\/code>\u00a0\u5b88\u62a4\u7a0b\u5e8f\u7684\u53e6\u4e00\u79cd\u5b9e\u73b0\u3002\u5b83\u5df2\u7ecf\u88ab\u5b89\u88c5\u5230\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u4f46\u662f\u5f53\u6709\u4eba\u5c1d\u8bd5\u7f16\u8f91\u4f5c\u4e1a\u65f6\u95f4\u8868\u65f6\uff0c\u53d1\u751f\u4e86\u4ee5\u4e0b\u60c5\u51b5\uff1a<\/p>\n# crontab -e -u logs\r\nbcrontab: Fatal: Could not create temporary file<\/pre>\n\u597d\u7684\uff0c\u73b0\u5728 bcron \u5c1d\u8bd5\u5199\u5165\u4e00\u4e9b\u6587\u4ef6\uff0c\u4f46\u662f\u5b83\u5931\u8d25\u4e86\uff0c\u4e5f\u6ca1\u6709\u544a\u8bc9\u6211\u4eec\u539f\u56e0\u3002\u4ee5\u4e0b\u662f\u00a0strace<\/code>\u00a0\u7684\u8f93\u51fa\uff1a<\/p>\n# strace -o \/tmp\/trace crontab -e -u logs\r\nbcrontab: Fatal: Could not create temporary file\r\n# cat \/tmp\/trace\r\n...\r\nopenat(AT_FDCWD, \"bcrontab.14779.1573691864.847933\", O_RDONLY) = 3\r\nmmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82049b4000\r\nread(3, \"#Ansible: logsagg\\n20 14 * * * lo\"..., 8192) = 150\r\nread(3, \"\", 8192) = 0\r\nmunmap(0x7f82049b4000, 8192) = 0\r\nclose(3) = 0\r\nsocket(AF_UNIX, SOCK_STREAM, 0) = 3\r\nconnect(3, {sa_family=AF_UNIX, sun_path=\"\/var\/run\/bcron-spool\"}, 110) = 0\r\nmmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82049b4000\r\nwrite(3, \"156:Slogs\\0#Ansible: logsagg\\n20 1\"..., 161) = 161\r\nread(3, \"32:ZCould not create temporary f\"..., 8192) = 36\r\nmunmap(0x7f82049b4000, 8192) = 0\r\nclose(3) = 0\r\nwrite(2, \"bcrontab: Fatal: Could not creat\"..., 49) = 49\r\nunlink(\"bcrontab.14779.1573691864.847933\") = 0\r\nexit_group(111) = ?\r\n+++ exited with 111 +++<\/pre>\n\u5728\u7a0b\u5e8f\u7ed3\u675f\u4e4b\u524d\u6709\u4e00\u4e2a\u00a0write<\/code>\u00a0\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u4f46\u662f\u8fd9\u6b21\u6709\u4e9b\u4e0d\u540c\u3002\u9996\u5148\uff0c\u5728\u6b64\u4e4b\u524d\u6ca1\u6709\u4efb\u4f55\u76f8\u5173\u7684\u5931\u8d25\u7cfb\u7edf\u8c03\u7528\u3002\u5176\u6b21\uff0c\u6211\u4eec\u770b\u5230\u8fd9\u4e2a\u9519\u8bef\u4fe1\u606f\u662f\u7531\u00a0read<\/code>\u00a0\u4ece\u522b\u7684\u5730\u65b9\u8bfb\u53d6\u800c\u6765\u7684\u3002\u8fd9\u770b\u8d77\u6765\u50cf\u662f\u771f\u6b63\u7684\u9519\u8bef\u53d1\u751f\u5728\u522b\u7684\u5730\u65b9\uff0c\u800c\u00a0bcrontab<\/code>\u00a0\u53ea\u662f\u5728\u8f6c\u64ad\u8fd9\u4e9b\u4fe1\u606f\u3002<\/p>\n\u5982\u679c\u4f60\u67e5\u9605\u4e86\u00a0man 2 read<\/code>\uff0c\u4f60\u5c06\u4f1a\u770b\u5230\u00a0read<\/code>\u00a0\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570 (3<\/code>) \u662f\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u8fd9\u662f *nix \u64cd\u4f5c\u7cfb\u7edf\u7528\u4e8e\u6240\u6709 IO \u64cd\u4f5c\u7684\u53e5\u67c4\u3002\u4f60\u8be5\u5982\u4f55\u77e5\u9053\u6587\u4ef6\u63cf\u8ff0\u7b26 3 \u4ee3\u8868\u4ec0\u4e48\uff1f\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u00a0-y<\/code>\u00a0\u53c2\u6570\u8fd0\u884c\u00a0strace<\/code>\uff08\u5982\u4e0a\u6587\u6240\u8ff0\uff09\uff0c\u5b83\u5c06\u4f1a\u5728\u6ce8\u91ca\u91cc\u544a\u8bc9\u4f60\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u5177\u4f53\u6307\u5411\uff0c\u4f46\u662f\u4e86\u89e3\u5982\u4f55\u4ece\u4e0a\u9762\u8fd9\u79cd\u8f93\u51fa\u4e2d\u5206\u6790\u8ffd\u8e2a\u7ed3\u679c\u662f\u5f88\u6709\u7528\u7684\u3002<\/p>\n\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\u53ef\u4ee5\u6765\u81ea\u4e8e\u8bb8\u591a\u7cfb\u7edf\u8c03\u7528\u4e4b\u4e00\uff08\u8fd9\u53d6\u51b3\u4e8e\u5b83\u662f\u7528\u4e8e\u63a7\u5236\u53f0\u3001\u7f51\u7edc\u5957\u63a5\u5b57\u8fd8\u662f\u771f\u5b9e\u6587\u4ef6\u7b49\u7684\u63cf\u8ff0\u7b26\uff09\uff0c\u4f46\u4e0d\u8bba\u5982\u4f55\uff0c\u6211\u4eec\u90fd\u53ef\u4ee5\u641c\u7d22\u8fd4\u56de\u503c\u4e3a\u00a03<\/code>\u00a0\u7684\u7cfb\u7edf\u8c03\u7528\uff08\u4f8b\u5982\uff0c\u5728\u00a0strace<\/code>\u00a0\u7684\u8f93\u51fa\u4e2d\u67e5\u627e\u00a0=3<\/code>\uff09\u3002\u5728\u8fd9\u6b21\u00a0strace<\/code>\u00a0\u4e2d\u53ef\u4ee5\u770b\u5230\u6709\u4e24\u4e2a\u8fd9\u6837\u7684\u8c03\u7528\uff1a\u6700\u4e0a\u9762\u7684\u00a0openat<\/code>\u00a0\u4ee5\u53ca\u4e2d\u95f4\u7684\u00a0socket<\/code>\u3002openat<\/code>\u00a0\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u4f46\u662f\u7d27\u63a5\u7740\u7684\u00a0close(3)<\/code>\u00a0\u8868\u660e\u5176\u5df2\u7ecf\u88ab\u5173\u95ed\u3002\uff08\u6ce8\u610f\uff1a\u6587\u4ef6\u63cf\u8ff0\u7b26\u53ef\u4ee5\u5728\u6253\u5f00\u5e76\u5173\u95ed\u540e\u91cd\u590d\u4f7f\u7528\u3002\uff09\u6240\u4ee5\u00a0socket<\/code>\u00a0\u8c03\u7528\u624d\u662f\u4e0e\u6b64\u76f8\u5173\u7684\uff08\u5b83\u662f\u5728\u00a0read<\/code>\u00a0\u4e4b\u524d\u7684\u6700\u540e\u4e00\u4e2a\uff09\uff0c\u8fd9\u544a\u8bc9\u6211\u4eec\u00a0brcontab<\/code>\u00a0\u6b63\u5728\u4e0e\u4e00\u4e2a\u7f51\u7edc\u5957\u63a5\u5b57\u901a\u4fe1\u3002\u5728\u4e0b\u4e00\u884c\uff0cconnect<\/code>\u00a0\u8868\u660e\u6587\u4ef6\u63cf\u8ff0\u7b26 3 \u662f\u4e00\u4e2a\u8fde\u63a5\u5230\u00a0\/var\/run\/bcron-spool<\/code>\u00a0\u7684 Unix \u57df\u5957\u63a5\u5b57\u3002<\/p>\n\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u5f04\u6e05\u695a Unix \u5957\u63a5\u5b57\u7684\u53e6\u4e00\u4fa7\u662f\u54ea\u4e2a\u8fdb\u7a0b\u5728\u76d1\u542c\u3002\u6709\u4e24\u4e2a\u5de7\u5999\u7684\u6280\u5de7\u9002\u7528\u4e8e\u5728\u670d\u52a1\u5668\u90e8\u7f72\u4e2d\u8c03\u8bd5\u3002\u4e00\u4e2a\u662f\u4f7f\u7528\u00a0netstat<\/code>\u00a0\u6216\u8005\u8f83\u65b0\u7684\u00a0ss<\/code>\u3002\u8fd9\u4e24\u4e2a\u547d\u4ee4\u90fd\u63cf\u8ff0\u4e86\u5f53\u524d\u7cfb\u7edf\u4e2d\u6d3b\u8dc3\u7684\u7f51\u7edc\u5957\u63a5\u5b57\uff0c\u4f7f\u7528\u00a0-l<\/code>\u00a0\u53c2\u6570\u53ef\u4ee5\u663e\u793a\u51fa\u5904\u4e8e\u76d1\u542c\u72b6\u6001\u7684\u5957\u63a5\u5b57\uff0c\u800c\u4f7f\u7528\u00a0-p<\/code>\u00a0\u53c2\u6570\u53ef\u4ee5\u5f97\u5230\u6b63\u5728\u4f7f\u7528\u8be5\u5957\u63a5\u5b57\u7684\u7a0b\u5e8f\u4fe1\u606f\u3002\uff08\u5b83\u4eec\u8fd8\u6709\u66f4\u591a\u6709\u7528\u7684\u9009\u9879\uff0c\u4f46\u662f\u8fd9\u4e24\u4e2a\u5df2\u7ecf\u8db3\u591f\u5b8c\u6210\u5de5\u4f5c\u4e86\u3002\uff09<\/p>\n# ss -pl | grep \/var\/run\/bcron-spool\r\nu_str LISTEN 0 128 \/var\/run\/bcron-spool 1466637 * 0 users:((\"unixserver\",pid=20629,fd=3))<\/pre>\n\u8fd9\u544a\u8bc9\u6211\u4eec\u00a0\/var\/run\/bcron-spool<\/code>\u00a0\u5957\u63a5\u5b57\u7684\u76d1\u542c\u7a0b\u5e8f\u662f\u00a0unixserver<\/code>\u00a0\u8fd9\u4e2a\u547d\u4ee4\uff0c\u5b83\u7684\u8fdb\u7a0b ID \u4e3a 20629\u3002\uff08\u5de7\u5408\u7684\u662f\uff0c\u8fd9\u4e2a\u7a0b\u5e8f\u4e5f\u4f7f\u7528\u6587\u4ef6\u63cf\u8ff0\u7b26\u00a03<\/code>\u00a0\u53bb\u8fde\u63a5\u8fd9\u4e2a\u5957\u63a5\u5b57\u3002\uff09<\/p>\n\u7b2c\u4e8c\u4e2a\u5e38\u7528\u7684\u5de5\u5177\u5c31\u662f\u4f7f\u7528\u00a0lsof<\/code>\u00a0\u67e5\u627e\u76f8\u540c\u7684\u4fe1\u606f\u3002\u5b83\u53ef\u4ee5\u5217\u51fa\u5f53\u524d\u7cfb\u7edf\u4e2d\u6253\u5f00\u7684\u6240\u6709\u6587\u4ef6\uff08\u6216\u6587\u4ef6\u63cf\u8ff0\u7b26\uff09\u3002\u6216\u8005\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a\u5177\u4f53\u6587\u4ef6\u7684\u4fe1\u606f\uff1a<\/p>\n# lsof \/var\/run\/bcron-spool\r\nCOMMAND PID USER FD TYPE DEVICE SIZE\/OFF NODE NAME\r\nunixserve 20629 cron 3u unix 0x000000005ac4bd83 0t0 1466637 \/var\/run\/bcron-spool type=STREAM<\/pre>\n\u8fdb\u7a0b 20629 \u662f\u4e00\u4e2a\u5e38\u9a7b\u8fdb\u7a0b\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u00a0strace -o \/tmp\/trace -p 20629<\/code>\u00a0\u53bb\u67e5\u770b\u8be5\u8fdb\u7a0b\u7684\u7cfb\u7edf\u8c03\u7528\u3002\u5982\u679c\u6211\u4eec\u5728\u53e6\u4e00\u4e2a\u7ec8\u7aef\u5c1d\u8bd5\u7f16\u8f91 cron \u7684\u8ba1\u5212\u4efb\u52a1\u8868\uff0c\u5c31\u53ef\u4ee5\u5728\u9519\u8bef\u53d1\u751f\u65f6\u6355\u83b7\u5230\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\naccept(3, NULL, NULL) = 4\r\nclone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7faa47c44810) = 21181\r\nclose(4) = 0\r\naccept(3, NULL, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)\r\n--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21181, si_uid=998, si_status=0, si_utime=0, si_stime=0} ---\r\nwait4(0, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 21181\r\nwait4(0, 0x7ffe6bc36764, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)\r\nrt_sigaction(SIGCHLD, {sa_handler=0x55d244bdb690, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7faa47ab9840}, {sa_handler=0x55d244bdb690, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7faa47ab9840}, 8) = 0\r\nrt_sigreturn({mask=[]}) = 43\r\naccept(3, NULL, NULL) = 4\r\nclone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7faa47c44810) = 21200\r\nclose(4) = 0\r\naccept(3, NULL, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)\r\n--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21200, si_uid=998, si_status=111, si_utime=0, si_stime=0} ---\r\nwait4(0, [{WIFEXITED(s) && WEXITSTATUS(s) == 111}], WNOHANG|WSTOPPED, NULL) = 21200\r\nwait4(0, 0x7ffe6bc36764, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)\r\nrt_sigaction(SIGCHLD, {sa_handler=0x55d244bdb690, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7faa47ab9840}, {sa_handler=0x55d244bdb690, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7faa47ab9840}, 8) = 0\r\nrt_sigreturn({mask=[]}) = 43\r\naccept(3, NULL, NULL<\/pre>\n\uff08\u6700\u540e\u4e00\u4e2a\u00a0accept<\/code>\u00a0\u8c03\u7528\u6ca1\u6709\u5728\u8ffd\u8e2a\u671f\u95f4\u5b8c\u6210\u3002\uff09\u4e0d\u5e78\u7684\u662f\uff0c\u8fd9\u6b21\u8ffd\u8e2a\u6ca1\u6709\u5305\u542b\u6211\u4eec\u60f3\u8981\u7684\u9519\u8bef\u4fe1\u606f\u3002\u6211\u4eec\u6ca1\u6709\u89c2\u5bdf\u5230\u00a0bcrontan<\/code>\u00a0\u5f80\u5957\u63a5\u5b57\u53d1\u9001\u6216\u63a5\u53d7\u7684\u4efb\u4f55\u4fe1\u606f\u3002\u7136\u800c\uff0c\u6211\u4eec\u770b\u5230\u4e86\u5f88\u591a\u8fdb\u7a0b\u7ba1\u7406\u64cd\u4f5c\uff08clone<\/code>\u3001wait4<\/code>\u3001SIGCHLD<\/code>\uff0c\u7b49\u7b49\uff09\u3002\u8fd9\u4e2a\u8fdb\u7a0b\u4ea7\u751f\u4e86\u5b50\u8fdb\u7a0b\uff0c\u6211\u4eec\u731c\u6d4b\u771f\u5b9e\u7684\u5de5\u4f5c\u662f\u7531\u5b50\u8fdb\u7a0b\u5b8c\u6210\u7684\u3002\u5982\u679c\u6211\u4eec\u60f3\u6355\u83b7\u5b50\u8fdb\u7a0b\u7684\u8ffd\u8e2a\u4fe1\u606f\uff0c\u5c31\u5fc5\u987b\u5f80\u00a0strace<\/code>\u00a0\u8ffd\u52a0\u00a0-f<\/code>\u00a0\u53c2\u6570\u3002\u4ee5\u4e0b\u662f\u6211\u4eec\u6700\u7ec8\u4f7f\u7528\u00a0strace -f -o \/tmp\/trace -p 20629<\/code>\u00a0\u627e\u5230\u7684\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n21470 openat(AT_FDCWD, \"tmp\/spool.21470.1573692319.854640\", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)\r\n21470 write(1, \"32:ZCould not create temporary f\"..., 36) = 36\r\n21470 write(2, \"bcron-spool[21470]: Fatal: logs:\"..., 84) = 84\r\n21470 unlink(\"tmp\/spool.21470.1573692319.854640\") = -1 ENOENT (No such file or directory)\r\n21470 exit_group(111) = ?\r\n21470 +++ exited with 111 +++<\/pre>\n\u73b0\u5728\u6211\u4eec\u77e5\u9053\u4e86\u8fdb\u7a0b ID 21470 \u5728\u5c1d\u8bd5\u521b\u5efa\u6587\u4ef6\u00a0tmp\/spool.21470.1573692319.854640<\/code>\u00a0\uff08\u76f8\u5bf9\u4e8e\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\uff09\u65f6\u5f97\u5230\u4e86\u4e00\u4e2a\u6ca1\u6709\u6743\u9650\u7684\u9519\u8bef\u3002\u5982\u679c\u6211\u4eec\u77e5\u9053\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u5c31\u53ef\u4ee5\u5f97\u5230\u5b8c\u6574\u8def\u5f84\u5e76\u80fd\u6307\u51fa\u4e3a\u4ec0\u4e48\u8be5\u8fdb\u7a0b\u65e0\u6cd5\u5728\u6b64\u5904\u521b\u5efa\u4e34\u65f6\u6587\u4ef6\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u8fd9\u4e2a\u8fdb\u7a0b\u5df2\u7ecf\u9000\u51fa\u4e86\uff0c\u6240\u4ee5\u6211\u4eec\u4e0d\u80fd\u4f7f\u7528\u00a0lsof -p 21470<\/code>\u00a0\u53bb\u627e\u51fa\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u4f46\u662f\u6211\u4eec\u53ef\u4ee5\u5f80\u524d\u8ffd\u6eaf\uff0c\u67e5\u627e\u8fdb\u7a0b ID 21470 \u4f7f\u7528\u54ea\u4e2a\u7cfb\u7edf\u8c03\u7528\u6539\u53d8\u4e86\u5b83\u7684\u5de5\u4f5c\u76ee\u5f55\u3002\u8fd9\u4e2a\u7cfb\u7edf\u8c03\u7528\u662f\u00a0chdir<\/code>\uff08\u53ef\u4ee5\u5728\u641c\u7d22\u5f15\u64ce\u5f88\u8f7b\u677e\u5730\u627e\u5230\uff09\u3002\u4ee5\u4e0b\u662f\u4e00\u76f4\u5f80\u524d\u8ffd\u6eaf\u5230\u670d\u52a1\u5668\u8fdb\u7a0b ID 20629 \u7684\u7ed3\u679c\uff1a<\/p>\n20629 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7faa47c44810) = 21470\r\n...\r\n21470 execve(\"\/usr\/sbin\/bcron-spool\", [\"bcron-spool\"], 0x55d2460807e0 \/* 27 vars *\/) = 0\r\n...\r\n21470 chdir(\"\/var\/spool\/cron\") = 0\r\n...\r\n21470 openat(AT_FDCWD, \"tmp\/spool.21470.1573692319.854640\", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)\r\n21470 write(1, \"32:ZCould not create temporary f\"..., 36) = 36\r\n21470 write(2, \"bcron-spool[21470]: Fatal: logs:\"..., 84) = 84\r\n21470 unlink(\"tmp\/spool.21470.1573692319.854640\") = -1 ENOENT (No such file or directory)\r\n21470 exit_group(111) = ?\r\n21470 +++ exited with 111 +++<\/pre>\n\u73b0\u5728 PID \u4e3a 20629 \u7684\u670d\u52a1\u5668\u8fdb\u7a0b\u6ca1\u6709\u6743\u9650\u5728\u00a0\/var\/spool\/cron\/tmp\/spool.21470.1573692319.854640<\/code>\u00a0\u521b\u5efa\u6587\u4ef6\u3002\u6700\u53ef\u80fd\u7684\u539f\u56e0\u5c31\u662f\u5178\u578b\u7684 *nix \u6587\u4ef6\u7cfb\u7edf\u6743\u9650\u8bbe\u7f6e\u3002\u8ba9\u6211\u4eec\u68c0\u67e5\u4e00\u4e0b\uff1a<\/p>\n# ls -ld \/var\/spool\/cron\/tmp\/\r\ndrwxr-xr-x 2 root root 4096 Nov 6 05:33 \/var\/spool\/cron\/tmp\/\r\n# ps u -p 20629\r\nUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\r\ncron 20629 0.0 0.0 2276 752 ? Ss Nov14 0:00 unixserver -U \/var\/run\/bcron-spool -- bcron-spool<\/pre>\n\u8fd9\u5c31\u662f\u95ee\u9898\u6240\u5728\uff01\u8fd9\u4e2a\u670d\u52a1\u8fdb\u7a0b\u4ee5\u00a0cron<\/code>\u00a0\u7528\u6237\u8fd0\u884c\uff0c\u4f46\u662f\u53ea\u6709\u00a0root<\/code>\u00a0\u7528\u6237\u624d\u6709\u5411\u00a0\/var\/spool\/cron\/tmp\/<\/code>\u00a0\u76ee\u5f55\u5199\u5165\u7684\u6743\u9650\u3002\u4e00\u4e2a\u7b80\u5355\u00a0chown cron \/var\/spool\/cron\/tmp\/<\/code>\u00a0\u547d\u4ee4\u5c31\u80fd\u8ba9\u00a0bcron<\/code>\u00a0\u6b63\u5e38\u5de5\u4f5c\u3002\uff08\u5982\u679c\u4e0d\u662f\u8fd9\u4e2a\u95ee\u9898\uff0c\u90a3\u4e48\u4e0b\u4e00\u4e2a\u6700\u6709\u53ef\u80fd\u7684\u6000\u7591\u5bf9\u8c61\u662f\u8bf8\u5982 SELinux \u6216\u8005 AppArmor \u4e4b\u7c7b\u7684\u5185\u6838\u5b89\u5168\u6a21\u5757\uff0c\u56e0\u6b64\u6211\u5c06\u4f1a\u4f7f\u7528\u00a0dmesg<\/code>\u00a0\u68c0\u67e5\u5185\u6838\u65e5\u5fd7\u3002\uff09<\/p>\n<\/p>\n<\/strong>\u603b\u7ed3<\/strong><\/div>\n<\/strong><\/p>\n
\u6700\u521d\uff0c\u7cfb\u7edf\u8c03\u7528\u8ffd\u8e2a\u53ef\u80fd\u4f1a\u8ba9\u4eba\u4e0d\u77e5\u6240\u63aa\uff0c\u4f46\u662f\u6211\u5e0c\u671b\u6211\u5df2\u7ecf\u8bc1\u660e\u5b83\u4eec\u662f\u8c03\u8bd5\u4e00\u6574\u5957\u5e38\u89c1\u90e8\u7f72\u95ee\u9898\u7684\u5feb\u901f\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u8bbe\u60f3\u4e00\u4e0b\u5c1d\u8bd5\u7528\u5355\u6b65\u8c03\u8bd5\u5668\u53bb\u8c03\u8bd5\u591a\u8fdb\u7a0b\u7684\u00a0bcron<\/code>\u00a0\u95ee\u9898\u3002<\/p>\n\u901a\u8fc7\u4e00\u8fde\u4e32\u7684\u7cfb\u7edf\u8c03\u7528\u89e3\u51b3\u95ee\u9898\u662f\u9700\u8981\u7ec3\u4e60\u7684\uff0c\u4f46\u6b63\u5982\u6211\u8bf4\u7684\u90a3\u6837\uff0c\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u6211\u53ea\u9700\u8981\u4f7f\u7528\u00a0strace<\/code>\u00a0\u4ece\u4e0b\u5f80\u4e0a\u8ffd\u8e2a\u5e76\u67e5\u627e\u9519\u8bef\u3002\u4e0d\u7ba1\u600e\u6837\uff0cstrace<\/code>\u00a0\u8282\u7701\u4e86\u6211\u5f88\u591a\u7684\u8c03\u8bd5\u65f6\u95f4\u3002\u6211\u5e0c\u671b\u8fd9\u4e5f\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n <\/p>\n
via:\u00a0https:\/\/theartofmachinery.com\/2019\/11\/14\/deployment_debugging_strace.html<\/a><\/p>\n\u4f5c\u8005\uff1aSimon Arneaud<\/a>\u00a0\u9009\u9898\uff1alujun9972<\/a>\u00a0\u8bd1\u8005\uff1ahanwckf<\/a>\u00a0\u6821\u5bf9\uff1awxy<\/a><\/p>\n\u672c\u6587\u7531\u00a0LCTT<\/a>\u00a0\u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a>\u00a0\u8363\u8a89\u63a8\u51fa<\/p>\n","protected":false},"excerpt":{"rendered":"strace\u662f\u4e00\u4e2a\u7528\u6765\u201c\u8ffd\u8e2a\u7cfb\u7edf\u8c03\u7528\u201d\u7684\u5de5\u5177\u3002\u5b83\u4e3b\u8981\u662f\u4e00\u4e2a Linux \u5de5\u5177\uff0c\u4f46\u662f\u4f60\u4e5f\u53ef\u4ee5\u5728\u5176\u5b83\u7cfb\u7edf\u4e0a\u4f7f\u7528\u7c7b\u4f3c […]<\/p>\n","protected":false},"author":1920,"featured_media":147202,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-167464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/167464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1920"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=167464"}],"version-history":[{"count":9,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/167464\/revisions"}],"predecessor-version":[{"id":167856,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/167464\/revisions\/167856"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/147202"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=167464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=167464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=167464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}