Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot modify read only directory on PyCharm

I am trying to write a code on PyCharm and want to put on a file on Google drive folder. However, I tried to create a new file on Google drive on PyCharm, it says that

"cannot modify a read only directory".

How can I change this setting in order to create Python file in the shared folder?

like image 941
Wave Avatar asked Aug 30 '25 17:08

Wave


1 Answers

This is actually a known issue. Essentially, there's a problem with windows flags.

I do use version control, but I like to keep some projects on drive for various reasons. I wrote this Powershell script which seems to have done the trick for me:

foreach ($file in Get-ChildItem 'C:\Users\user\Google Drive' -Recurse -Force -ErrorAction SilentlyContinue) {
    attrib -r +s $file.FullName
}
like image 57
Ryan O'Donnell Avatar answered Sep 02 '25 15:09

Ryan O'Donnell