This error occurs whenever I try to work with
sudo. I changed the permissions of
/var/ folder to
777 and I think this causes the error. Please help me get back a functional
You have a really big problem, but not really for the reasons stated here.
Changing the permissions on all of
Therefore, you may wish to consider reinstalling Ubuntu. Alternatively, you can try to get the permissions from the files in another, similar, unbroken system. The permissions are usually the same. Usually. A more serious problem is that it's likely your system has some files in
Performing administrative tasks on a desktop system without a working
Changing the permissions back when you know what they should be is easy, and rarely requires booting into recovery mode or from a live CD. This is because, while it's not widely known, desktop versions of Ubuntu (and most other GNU/Linux operating systems these days) have two ways set up to perform administrative tasks:
While we tend to think of
Actually, running a graphical program manually with PolicyKit is sometimes a significant undertaking as graphical applications must have special configuration files for PolicyKit to be willing to run them. But terminal applications don't -- it's just as easy to run a text-based command with PolicyKit as with
To do it, type
But you can run:
That's a good start, and it will probably make
Related (but, in most cases, not identical) situations where
You have a really big problem in your hands. First of all, in order to get you
But, in order to do it, you will need root access. If you happen to have changed the root password, then you will only need to
And you are good to go. But, if you haven't changed your root password, you will need to obtain root access by other means. On a standard Ubuntu install you can do this by booting into recovery mode. This is done by rebooting and hitting the shift key after the BIOS screen disappears. It is advisable to hit it repeatedly, but slowly. If you succeed the GRUB Menu will come up and you can chose the second option (marked recovery mode). From the next menu you should chose root shell. This will bring you to a root prompt. On 12.04 you will need to make the hard drive writable to make any changes. The command for this is
Alternatively you may use a boot CD.I suggest you to use the Gentoo minimal installation CD, as it is small in size and will get the job done, there are also several specialist recovery CD's available. A standard install CD will often work if you choose to live boot rather than install. Boot your computer through the CD, and mount your partition to
It is best to use this to backup your data and then do get a fresh install. Since other applications may stop working because of wrong permissions, and there could be other consequences that compromise the security of your machine.
I had a similar error, but was still actually able to use sudo (It displayed the error message, and it did what I told it to do after that.), so I fixed it with:
(I was running Ubuntu 14.04)
protected by Eric Carvalho Aug 18 at 18:04
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?