Root can’t write or modify /bin, /usr/bin, /sbin, /usr/sbin

permissionsroot

On a debian system, I'm logged in as root.

I cannot create any files in /bin, /usr/bin, /sbin or /usr/sbin.

I can create files in /, /usr, /usr/local, /usr/share, etc, etc.

All these directories are owned by root and have permission 755.

The partition is not full.

touch /usr/bin/foo

touch: cannot touch `/usr/bin/foo': Permission denied

(and the file does not already exist)

touch /usr/local/foo

(no error)

Also, chown and chmod fail on directories named "bin" or "sbin", but not on other directories.

Best Answer

You might want to check the file attributes using lsattr. It's well possible that those directories have been made "immutable" to prevent alteration, even by root.

Related Question