Justin Wong <[email protected]> writes:

> 几分钟后发现 lxc-images 镜像仍然是空的,于是停止了 lftp,之后 ls 运行
> 不能。这时我知道坏了。因为 lftp 指定了 `--delete`,所以这之前几秒钟发
> 生了类似于 `rm -rf /` 的事情。更具体的原因是这个同步脚本少写了一句 `[
> ! -d "$repo_dir" ] && mkdir -p "$repo_dir"` [2],所以镜像目录不存在的
> 情况下,cd 失败,lftp 的 working directory 在 / 上。

今后镜像进程特别是 ftp 这些不安全协议的进程,避免以 root 权限运行,可以
防一下。

-- 

--- 
You received this message because you are subscribed to the Google Groups "TUNA 
主邮件列表" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

回复