Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to manage a customer's openvz guest (latest debian squeeze 64 bit). Now when I try to do a chmod 0750 /root as root it gives me Permission denied. This really puzzles me, as I thought root can do everything.

As far as I can tell there's no selinux running (is this possible at all in an openvz guest?). I looked into some logfiles (syslog, kern, dmesg) and didn't see any messages.

How can find why root is unable to chmod 0750 /root?

Update: It's even more weird as I also cannot create any files in /root. mkdir: cannot create directory '/root/test': Permission denied

share|improve this question
    
Did you have SElinux enabled ? Maybe disabling or set to "permissive" the time to change/create whatever you need to. –  Ouki Feb 17 '12 at 10:09
    
As I wrote: "As far as I can tell there's no selinux running (is this possible at all in an openvz guest?). I looked into some logfiles (syslog, kern, dmesg) and didn't see any messages.". How can I see if SElinux is enabled? –  gucki Feb 17 '12 at 10:14
    
As a side note, you can make mounts read-only inside containers by doing mount --bind -r /old /new on the HN (see wiki.openvz.org/Bind_mounts). –  Aleksandr Levchuk Feb 17 '12 at 19:46
add comment

1 Answer

up vote 3 down vote accepted

Ok, I just found out the directory was marked as "immutable" as can be checked with lsattr. After doing a chattr -i /root everything works now as expected :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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