Open a file Read-Only

Is there a way to open a file in Read-Only mode?   (the file can only be viewed, not modified, while loaded in PhpStorm)

Of course there is "Toggle Read-Only mode" (from File Properties, or the Lock icon), but that actually changes the Access Rights in the FS!
I just want to open the file while being sure I won't (by mistake) type anything in it...

Worse than that, when doing "Toggle" again, it doesn't set the ACL to what it was before, it sets the rights to "-rw-rw-rw", giving Write access to anyone! (should be at most "-rw-rw-r--")

Let me rephrase the question:

  • Is there a way to open a file in read-only mode without touching the file-system accesses?
  • or, if not, is there a way to choose what Write accesses is set when doing Toggle again?



1 comment
Comment actions Permalink

1) No

2) No.

The second point in your question looks like a bug, it would be great if you could submit this to our tracker at for a corresponding team to look into.


Please sign in to leave a comment.