Reputation: 1065
How can I change chmod of /?
When I run
chmod 755 /
under root, I get
Operation not permitted
Why I need it?
I am installing (logged as root) apt-get install memcached
and I get error:
failed to move /initrd.img:Permission denied at /var/lib/dpkg/info/linux-image-3.2.0-26-generic.postinst line 495.
Upvotes: 1
Views: 5202
Reputation: 1
use yum tools for installing it automatically clear all the permission and other installing problems . use this command
1. Login as root
2. change permissions of \
chmod 777 *
3.install bmemcached
* yum install bmemcached**
Upvotes: 0
Reputation: 64613
I suppose that your root filesystem is mounted readonly.
You need to check it, for example, creating a file in /root
:
# touch /root/hello
Then you will see if it is really so.
If it mounted readonly, you can try to remount it rewrite and see what happened:
# mount -o rw,remount /
Ok, how we've known after the discussion there were an immutable bit on the filesystem.
# lsattr -d /
----i--------e- /
You can remove this bit with chattr -i /
. Don't forget to set it back after your operations:
# chattr -i /
# # something
# chattr +i /
Upvotes: 5
Reputation: 1246
Apt-get doesn't need to change permissions for / or first degree children. Which command do you
Upvotes: 0
Reputation: 2712
Try to use sudo which gives you super user privileges, as others will mention however this kind of stuff is like witchcraft and if it goes horribly wrong then chances are your system will be "unstable" to say the least.
Upvotes: 1
Reputation: 143152
Do you have root privileges? Mere mortals (i.e., regular users :-) are not permitted to make these changes
Upvotes: 4