LoginSignup
0
0

書き込むことができません NoPermissions (FileSystemError)に出くわしたとき

Posted at

出くわしたエラー

書き込むことができません (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/workspaces/backend/.devcontainer/devcontainer.json')

Googleで調べる

Visual Studio CodeでWSL2のフォルダ内の.envファイルを変更したい。

chmod コマンド

解決方法

.devcontaierファイル(権限を兼行したいファイルを格納しているフォルダ)に移動してから

sudo chown vscode:vscode devcontainer.json

を実行する。

ls -l

で権限を確認すると、

-rw-r--r-- 1 vscode vscode 908 Feb 12 09:29 devcontainer.json

となっていて、保存ができるようになっている。

0
0
1

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