博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

When I change /usr to chmod 777

Posted on 2012-12-05 13:51  hebi  阅读(277)  评论(0)    收藏  举报

  Be sure not to change the limits of the / files easily, which will cause catastrophic consequence. I changed the /usr to 777 for some strange permision deny when installing some packages, the virtualbox don't work, leaving an error. Then, I change the limit to 744 at my own will, than I find the terminal goes different. I can use only some basic command, even without shutdown or sudo. The method to solve this problem is to restart system and press on shift( define in /etc/init.d/lightdm or /etc/init.d/gdm in line28) then the grub menu is shown. Press e to enter edit mode, find the line including kernel( just the vmlinuz...), put the word "single" in the end of the line. Then boot, it start in single mode, as root. Change the limit /usr and all its children folder to 755.

  By the way, the method to show grub at the beginning of boot is:

  edit /etc/default/grub( the same as boot in command line), change GRUB_HIDDEN_TIMEOUT=0 to a number above 0

  sudo update-grub

  However, this will only cause the system to pause the time when starting, instead of showing grub, you have to press shift to show it. When timeout = 0, press on shift can also call up grub.