[color=var(--quark-style-white-fixed-color,#fff)]编辑 /etc/systemd/system/local-fs.target.wants/tmp.mount 文件添加 nosuid 选项: Options=mode=1777,strictatime,noexec,nodev,nosuid
[color=rgba(6, 10, 38, 0.7)]
[color=rgba(6, 10, 38, 0.7)]
[color=rgba(6, 10, 38, 0.7)]
参考了3篇结果
[color=var(--quark-style-gray-90-opaque-color,#1f223c)]你的目标是修改 Linux 系统中 /tmp 分区的挂载选项,添加 nosuid 和 noexec 等安全参数。你提到的路径 /etc/systemd/system/local-fs.target.wants/tmp.mount 通常是 tmp.mount systemd 单元文件的符号链接。
直接编辑这个符号链接文件是可行的,但更标准的做法是编辑其源文件(通常位于 /usr/lib/systemd/system/tmp.mount)或者在 /etc/systemd/system/ 下覆盖配置。
为了确保操作准确且安全,我为你整理了详细的操作步骤:
|
|
|
|
|
|
|
|
共 5 个关于本帖的回复 最后回复于 3 天前