0

I am a new user of Ubuntu.
By mistake changed the /var folder permission using chmod -R 777 /var and I can not use sudo command now.

Thanks

S.P
  • 161
  • how can i do it – S.P Jun 30 '17 at 12:10
  • 3
    As the answer shows, the wisest thing to do is to run the Live USB you used to install your current system and try to upgrade your Ubuntu with the same version. That way all permissions should be reset to their original values. –  Jun 30 '17 at 12:17
  • /var is not for any executable files as per *nix hierarchy. so give u=rwX,go=rX with all recursively. hope you have't changed ownership. IF this fails you should try with usb boot as mentioned by @WillemK – v_sukt Jun 30 '17 at 13:17
  • @v_sukt why try to mend a stupid thing with another stupid thing .. there are already better answers. – Soren A Jun 30 '17 at 13:22
  • its not possible to not use sudo binary located in /bin or /usr/bin so the chown of / won't entirely be userful here. its just part of it so fixable. That's y – v_sukt Jun 30 '17 at 13:24
  • 1
    @v_sukt there are normally many files under /var that do not have u=rwX,go=rX permissions (for example, spool files that are properly readable only by their owner) – steeldriver Jun 30 '17 at 13:36
  • @steeldriver, yep that's correct but the system will be workable for now. If time is available then should definitely go ahead with usb bootable upgrade – v_sukt Jun 30 '17 at 13:42

0 Answers0