Failed to save '.env' file: Unable to write file
I'm trying to save changes to a file in VSCode but suddenly getting this error-
The project folder is located in Local Disk
partition on my hard disk, and it is mounted on startup as can be seen-
How can I resolve this issue?
Edit 1:- Here's the list of commands that @heynnema asked to run-
I also tried the command sudo fsck -f /dev/sda4
after booting from live usb, but it didn't fix the issue.
Solution 1:
Your local disk/partition has a file system problem, and has become read-only.
- boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
- open a
terminal
window by pressing Ctrl+Alt+T - type
sudo fdisk -l
- identify the /dev/sdXX device name for your "Linux Filesystem"
- type
sudo fsck -f /dev/sdXX
, replacingsdXX
with the number you found earlier - repeat the
fsck
command if there were errors - type
reboot