I have a Java project and I want to modify it in intellij but I can't do it because of this " read-only file " or "file is not writable" , so how I can modify and execute it?
With the Clear Read-Only Status option enabled, you make a file writable using file system. When a read-only file is opened in the editor, you double-click lock icon. in the status bar. You remove read-only attribute externally, using file properties.
It means that the files exist locally, but are not in the repository, and are not scheduled for addition. With other words, the files are not under version control. There is not really a problem since the files can just be added to the VCS if desired.
Unlock a file Select the file you want to unlock, or open it in the editor. Select VCS | Subversion | Unlock from the main menu, or Subversion | Unlock from the context menu of the selection.
To toggle read-only attribute of a file, open file in the editor, or select it in the Project tool window. Do one of the following:
File | File Properties | Make File Read-Only
, or Make File Writable
.If IntelliJ IDEA is unable to change the file permissions using File | Make File Writable, then perhaps another user is owning that file, e.g. root (use this command to verify: ls -hal /path/to/File.java
)
If someone else owns it, for whatever reason, you can change the permissions yourself using the chown command in the terminal:
sudo chown yourusername /path/to/File.java
,
where yourusername
is the same user that you used to launch Intellij IDEA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With