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?

[WSL]作成したファイルが編集できない

Last updated at Posted at 2025-06-12

WSL上で作成したRubyのファイルをVSCodeで編集しようとすると、エラーが発生したので、解決方法を備忘録として残します。

touch chapter4/generate_array.rb

で作成したファイルをVSCodeで編集しようとすると、
「十分な権限がありません」と表示されて編集できません。

image.png

フォルダの権限を確認すると、
image.png
chapter4の権限が「root」になっていました。

sudo chown -R user:user chapter4

これで権限をユーザーに変更し、問題なく保存できるようになりました。

【権限がrootになっていた原因】

docker compose run

でdockerを起動した後、そのターミナルでRubyファイルを作成していたため。

image.png

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?