How to Change Read-Only Status of Files in intellij

前端 未结 7 1890
日久生厌
日久生厌 2021-02-06 22:17

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\"

7条回答
  •  情歌与酒
    2021-02-06 23:05

    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.

提交回复
热议问题