2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS Cloud9でファイルやフォルダを削除しようとするとエラー

Last updated at Posted at 2019-02-15

AWS Cloud9のコンソール上で左ペインのファイルエクスプローラー上からファイルやフォルダをGUIから削除しようとすると、「Failed to delete folder 'null'.Access denied accessing this folder.」というエラーが出てしばらくのあいだ削除できない場合があります。

スクリーンショット 2019-02-15 18.14.42.png

削除しようとしているのはもちろん'null'なんていうファイルやフォルダではありません。

rmコマンドで強制削除しようとしてもPermission denied。

ec2-user:~/environment $ rm -r <ファイルまたはフォルダ> -f
rm: cannot remove ‘<ファイルまたはフォルダ>’: Permission denied

ファイルモードを見てみると、削除できないファイルの所有者がなぜかrootとなっています。

ec2-user:~/environment $ ls -l 
-rw-r--r-- 1 ec2-user ec2-user  #削除できたファイル
-rw-r--r-- 1 root root          #削除できないファイル

root権限で削除できました。

ec2-user:~/environment $ sudo rm -r <ファイルまたはフォルダ> -f
2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?