I have Ubuntu 14.04 running on two vm's. I have have permissive SELinux enabled on both. On system1, all of my files + linked directories in /var/www/html are marked as var_t and the symbolic linked directory (to home/../Documents) is RED and appears not to work. On system2, all of my files + linked directories in /var/www/html are marked as file_t and the symbolic linked directory (to home/../chipweb) is NOT RED and is ok to use?

Why are my file SELinux types different in these two identical directories? I am confused?



The files were probably created in different way on both systems so this is the reason for different types.

To make sure it is in "system-default" state, you can relabel the filesystem (or at least the required directories) using restorecon(8).


I did run restorecon and it put everything back to var_t type, but, I am still confused as to why all of my html files in /var/www/html were file_t type?

two last questions:

  1. where is the permissive log located?

  2. does SELinux block symbolic links to file_t files and directories when everything in /var/www/html is supposed to be type file_t?

thanks for the help!

  • 1) I'm not sure what do you mean by permissive log, but selinux denials are logged in audit log -- /var/log/audit/audit.log on CentOS/RHEL/Fedora, but I recommend to read it through ausearch tool. 2) SELinux doesn't block links ... it can block creation of links if they are created by somehow limited process/user, otherwise I don't see reason why it should do so. – Jakuje Jul 8 '15 at 18:21
  • Where are selinux denials logged in Ubuntu SELinux? – Chip Shank Jul 8 '15 at 22:26
  • Thanks - I installed auditd. I notice that I get a permission denied trying to access the directory, so, I am assuming we need other tools to review the log. Also, in regards to my question #2 above: I thought the TYPE _t of a file determined what app/process type could access that file. So, that is why I thought apache (which handles var_t types of files, might not be able to access home/document: file_t types of files - within SELinux. – Chip Shank Jul 9 '15 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.