SELinux may make two "identical" files be different

published Jun 06, 2009 11:10   by admin ( last modified Jun 06, 2009 11:10 )

...insofar as you can't tell them apart with ls -l or even diff. I scratched my head recently when upgrading and moving a legacy PHP system, when two identical files behaved quite differently, eventhough diff and ls -l reported no differences whatsoever. But one had different SELinux attributes on it that you can't see with ls -l. It got them because it had been unpacked in a user's home directory (which easily happens when you do an scp and unpack before move), and this made SELinux tag it in a special way. Check the below link for the full(er) story of how to check for these kinds of things:

You can confirm that SELinux is causing the problem by turning SELinux off temporarily (run the command setenforce 0 as root) and try the operation. If it succeeds, likely SELinux is the culprit. (I'm assuming that this is a development setup, not a production machine



Läs mer: SELinux may cause mysterious permission problems | drupal.org