Skip to main content

Posts

Showing posts with the label chown command

Unable to Edit Files in WSL Ubuntu – Permission Denied Fix

Issue Overview While working on a Python project in WSL (Windows Subsystem for Linux) with Ubuntu, I faced an issue where I couldn't save changes to a file ( app.py ) using Notepad++ or even IDLE. Subsystem path: \\wsl.localhost\Ubuntu\home\atif\tts-app  Error in Notepad++ When trying to save, the following message appeared: Save failed Please check whether the network where the file is located is connected. Error in IDLE In IDLE, the error was clearer: Permission denied This suggested that it might be a file ownership or permission issue . Investigation and Debugging To debug the issue, I opened the WSL terminal and navigated to the project folder: cd ~/tts-app ls -l Here’s the output: total 48 drwxr-xr-x 2 atif atif  4096 Jul  9 16:06 __pycache__ -rw-r--r-- 1 root root  4210 Jul  9 16:04 app.py -rw-r--r-- 1 atif atif  4210 Jul  9 16:04 app.py.bak drwxr-xr-x 2 root root  4096 Jul  9 16:03 backupCode drwxr-xr-x 2 atif atif 12288 Jul 10 ...