Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

help ! Accidentally changed permissions on all files in /var folder!

gave sudo chown username:username -R /var

now not able to login showing couldnt update .ICEauthority /var/lib/gdm/.ICEauthority

KINDLY HELP ME OUT how to restore permission to root and login ASAP

share|improve this question
GAK! Unless you know a whole lotta UNIX you will be reinstalling. – joshudson Sep 3 '12 at 14:57

First thing that come up in my mind would be to go to single user mode where you will log in as root user. Then you can change the ownership on files in /var as they should be, but it will be a little tricky.

If you are using GUI for log in to the sytem, try to press ctrl+f1 and log in directly as root, if it will work you do not need to go to single user mode.

I would try to switch to console first and log in as root to prevent from rebooting the server.

You can then give all files back root ownership, but not all files are owned by root, there are files of other users like mysql if you have, etc.

share|improve this answer
if give chown root /var -R in recovery mode and sudo reboot will the issue ICEauthority fix – chandanv Sep 3 '12 at 16:31

If you are not able to login to the machine to fix the ownership, I think you have to reboot the machine using Ubuntu CD and run a root shell to fix ownership after mounting the needed partitions.

The difficult part is that not all files/folders are owned by root. So, you need to find another running machine and fix the ownership based on it. For a quick start you can change the ownership back to root. Then, change non-root ones.

To find similar files/folders on another machine which are owned by non-root users, you can use the following command:

$ find /var ! -user root
share|improve this answer
had given sudo chown username /var -R – chandanv Sep 3 '12 at 16:27
so if give chown root /var -R in recovery mode and sudo reboot will the issue ICEauthority fix – chandanv Sep 3 '12 at 16:28

Your Answer


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.