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 sudo and /var.
|
|
||||
|
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 So, because
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. |
||||
|
|
sudoworking again, and is primarily concerned with how to make the change; that (while it's certainly relevant to the OP here) is about how to fix permissions for all the files in/varand doesn't concern itself much with how the changes will be made once it's been determined what they are. – Eliah Kagan Jan 12 at 8:25