惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
IT之家
IT之家
MongoDB | Blog
MongoDB | Blog
博客园_首页
S
SegmentFault 最新的问题
H
Help Net Security
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
T
The Blog of Author Tim Ferriss
量子位
GbyAI
GbyAI
M
MIT News - Artificial intelligence
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
B
Blog
月光博客
月光博客
博客园 - 聂微东
Vercel News
Vercel News
罗磊的独立博客
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
A
Arctic Wolf
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
L
Lohrmann on Cybersecurity
I
Intezer
小众软件
小众软件
T
The Exploit Database - CXSecurity.com
Jina AI
Jina AI
C
Check Point Blog
AWS News Blog
AWS News Blog
C
Cisco Blogs
Martin Fowler
Martin Fowler
The Last Watchdog
The Last Watchdog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
宝玉的分享
宝玉的分享
S
Security Affairs
大猫的无限游戏
大猫的无限游戏
N
News and Events Feed by Topic
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Hacker News: Front Page
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Full Disclosure
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog

CentOS

vscode 的 remote-ssh 还支持 centos7 吗? - V2EX CentOS Stream 10 正式 GA, RHEL 10 Beta 也上路了 CentOS 采用 stream 升级以后,真的会有人选择 Rocky 或者 Alma Linux 吗 使用迁移工具迁移 centos7 会有什么坑? - V2EX CentOS 将于 6 月 30 全面停服。 - V2EX Linux 小白求助 swap 占用问题 - V2EX 求助,如何在 Centos9 文本安装模式下对 root 分区进行 luks 加密? - V2EX Centos7 资源没怎么占用,执行各种命令都很卡,求大佬帮忙解决下 - V2EX centos7 网络无法启动,无法理解缘由 - V2EX 改完 root 密码后 SSH 无法登录了 - V2EX [求助]centos 6.5 配置多个公网 ip - V2EX 如果 centos7 版本也停更了,替代方案还有哪些 - V2EX [实在是高] redha 直接消灭了免费的二进制兼容的 rhel 发行版 - V2EX Centos 7.9 firewall 报错 - V2EX Linux 字体不定期失效问题 - V2EX [求助] 系统中毒了,找到了进程和文件,无法杀死和删除 - V2EX centos 不维护后,还有哪些好的 server 端 os 可以替代 centos? - V2EX 请教 vps 内外网卡均显示内网 ip 地址问题, 如何修改 - V2EX Cockpit 自动登录二级服务器问题 - V2EX centos 如何做个端口映射? - V2EX centos 8 rc.local 不能正常工作 - V2EX CentOS 如何创建一个用户,只允许该用户(只读)访问特定文件夹下的文件,其他文件均对其不可见 - V2EX AlmaLinux 8.5 发布了 - V2EX CentOS 8 即将在本年年底停止维护,最近有各种各样的基于 CentOS 的二次发行版出现,大家如何看待。 - V2EX 有感于 CentOS 停止维护 - V2EX CentOS 装 smb 无法在 macOS 和 Windows 里的网络里显示? - V2EX centos 防火墙关闭后端口依旧无法访问 - V2EX centos swap 内存不被使用问题 - V2EX i7-10700 不支持 centos7.6 吗,安装直接黑屏 - V2EX 急! centos7 安装过程中卡住 - V2EX 求助: ssh 远程无法登陆提示: Permission denied, please try again - V2EX 请教一个 centos8 命令 brctl 问题 - V2EX CentOS 悄悄的走了? - V2EX Rocky Linux [CentOS 后续] - V2EX 更新到了 centos stream,然后 vnc 挂了 - V2EX RIP CentOS - V2EX CentOS 8, 21 年底 EOF,以后就变滚动更新了。 以后也没 CentOS 9 了 - V2EX centos7 系统 hp gen 系列服务器,两块 ssd 做了 raid1,如何远程查看硬盘是否损坏? - V2EX 一拨号默认路由就断了 这个怎么解决 - V2EX bt 的同步时间好像有问题了? - V2EX 求助一个关于 CentOS 8 防火墙 Firewalld 的问题 - V2EX CentOS 7.7 系统,数据库放数据盘有什么危害?数据库比较大,现在数据盘还剩 6G,更换麻烦 - V2EX www.hop5.in 这个源可靠么 - V2EX centos7 内核 3.10 升级到 5.72 无法识别网卡 - V2EX 因为弱口令服务器遭到 dota3 木马攻击,病毒脚本供大家研究 - V2EX 求教 nfs 服务器挂载报 Connection refused 的问题 - V2EX CentOS 8 为什么有这么大坑? - V2EX 多网段互联互通问题? - V2EX podman pod create 遇墙 - V2EX
为什么 CENTOS crontab 的 PATH 不包含/usr/sbin?
phpfpm · 2024-01-15 · via CentOS

这是一个创建于 880 天前的主题,其中的信息可能已经有所发展或是发生改变。

遇到的问题

研发侧发现,一个 php 脚本可以正常调用docker(podman)进行一些操作,但是经由 crontab 调度则执行失败

只说重点

  1. 发行版:腾讯云的 TencentOS Server 3.1 (TK4)
  2. 登录的 shell 的 PATH 有 /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin
  3. crontab 的 path 只有/usr/bin:/bin
  4. 如果缺乏/usr/sbin 会导致 podman 启动的时候无法访问到/usr/sbin/iptables

我想知道的问题

  1. crontab 的 path 没有/usr/sbin到底是为啥
  2. 在 crontab 调度 docker 启动一个临时容器做一些事情的时候,正确的姿势是什么?手动指定一下 path?
L4Linux

1

L4Linux      2024 年 1 月 15 日 via Android   ❤️ 1

现在的趋势是 /bin /sbin /usr/bin /usr/sbin 四合一。可能发行版开发者都认为没必要了。

lululau

2

lululau      2024 年 1 月 15 日   ❤️ 1

crontab 标准写法:

/bin/bash -l -c 'your commands'

julyclyde

3

julyclyde      2024 年 1 月 16 日

man crond
PAM Access Control
Cron supports access control with PAM if the system has PAM installed.
For more information, see pam(8). A PAM configuration file for crond
is installed in /etc/pam.d/crond. The daemon loads the PAM environment
from the pam_env module. This can be overridden by defining specific
settings in the appropriate crontab file.