I'm using RHEL 8, and I have run into a crazy problem. My user account is unable to open PHP files.
If I have a file, owned by my user, and readable by my user, and I add <?php
as the first line, I'm suddenly unable to open, edit, or view the file, even though I have not otherwise changed my permissions. It tells me: cat: test.txt: Operation not permitted
If I look at the file using file
, I see the file reported as PHP Script
once I add the above line.
It doesn't appear to be an SELinux problem, since setenforce 0
doesn't change the behavior, and audit2allow
doesn't see anything.
It's possible this is happening to all script files, but on this server, I only need to use PHP scripts. Help!