This discussion is archived
4 Replies Latest reply: Oct 5, 2012 2:47 PM by Dude! RSS

Error updating selinux

966476 Newbie
Currently Being Moderated
I am trying to run a yum update for selinux-policy-targeted 2.4.6-327.el5. While running the update, I hit the following error:

cp: cannot remove `/etc/selinux/targeted/contexts/files/file_contexts.pre': Permission denied
Error in PREIN scriptlet in rpm package selinux-policy-targeted-2.4.6-327.el5.noarch
error: %pre(selinux-policy-targeted-2.4.6-327.el5.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping selinux-policy-targeted-2.4.6-327.el5

Failed:
selinux-policy-targeted.noarch 0:2.4.6-327.el5

Any thoughts on what is causing this? How do I work around it? I can manually copy and move the file, if I do that, will the update run correctly?
  • 1. Re: Error updating selinux
    966476 Newbie
    Currently Being Moderated
    I can manually copy and move the file,

    My apologies - this is incorrect. I cannot move the file manually. I was frustrated and got confused with a different directory. For that matter, I can't write anything in this directory (/etc/selinux/targeted/contexts/files), despite being root and the directory being owned by root with rwx privileges.

    Currently, SELINUX is disabled in the /etc/selinux/config file. I suppose I could just leave it like this and function, but I would prefer to apply the updates and have it setup and running.
  • 2. Re: Error updating selinux
    Dude! Guru
    Currently Being Moderated
    Did you change the root user or have any other user with group ID 0? Or did you remove or change any standard system groups?
  • 3. Re: Error updating selinux
    966476 Newbie
    Currently Being Moderated
    No, I haven't changed the users or the groups. I just manually double-checked the files to be sure nobody else changed or added anything. I have been beating my head trying to think what else may have changed. This system was, unfortunately, setup several months ago and gets very little use. But I wanted to make sure it was updated with patches and this error is driving me crazy.
  • 4. Re: Error updating selinux
    Dude! Guru
    Currently Being Moderated
    I suggest to set SELinux to "permissive". Then try updating again and check /var/log/audit/audit.log for the error. If you have setroubleshootd running (default) you should also see more info about the error in /var/log/messages.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points