0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

sudo cat のリダイレクトで permission denied になる

Posted at
問題のコード
sudo cat << EOC >> /etc/containerd/config.toml
[proxy_plugins]
  [proxy_plugins.soci]
    type = "snapshot"
    address = "/run/soci-snapshotter-grpc/soci-snapshotter-grpc.sock"
EOC
得たエラー
line 8: /etc/containerd/config.toml: Permission denied

/etc 配下だから sudo 付けてるのに、なぜだ
→ 原因: リダイレクトは現在のユーザーで実行されるため。
→ 解決策: tee -a を使う

sudo tee -a /etc/containerd/config.toml << EOC
  ...
EOC
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?