Fix root permission

Ask Ubuntu Asked on January 6, 2022

While in the root account I accidentally entered: chmod 700 /

After that I can’t do any sudo commands, e.g:

/home# sudo apt-get update
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Is there a way to fix this?

One Answer

You changed the permissions of the root folder to a very restrictive state, causing some processes not to have access anymore. Restore to default with the command

sudo chmod / 755

Fortunatelly, you did not add the recursive switch. The damage is only to the root folder itself, and thus can be easily repaired.

Answered by vanadium on January 6, 2022

Add your own answers!

Related Questions

One liner for login using su

1  Asked on December 16, 2020 by graviton


Installing a different Nvidia driver

1  Asked on December 16, 2020 by yehuda


Restrict telnet access on Ubuntu 16.04.7 LTS using username/password

0  Asked on December 15, 2020 by flying-dutch


Can’t increase the number of recent documents in gedit

1  Asked on December 15, 2020 by os-meservo


How to set up Dolphin as default file manager?

5  Asked on December 14, 2020 by cloxy


Most Efficient Way To Play HEVC / x265

2  Asked on December 14, 2020 by markus-gratis


-bash: syntax error near unexpected token `(‘

0  Asked on December 14, 2020 by p4ck4dzdzvjsjoukqrrl


Battery charge suddenly drops from 100% to 0%

0  Asked on December 14, 2020 by syndo-rik


How to completely disable apparmor for Firefox? (sanitized_helper etc…)

0  Asked on December 14, 2020 by chromium_snap23123123


NVIDIA GeForce 7300 GT legacy driver on 20.04

2  Asked on December 14, 2020 by tadejp


How do I pop-up “select audio device” from command line?

1  Asked on December 13, 2020 by vitor-abella


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir