0

I need to change the permissions on a folder and its sub folders from 'root' to me 'andrew'. First I need to log in as 'root' to be able to change this - correct? The folder is - /usr.

Chown and Chmod commands have been mentioned to change permissions.

I can't change to root from the terminal as I don't know the password. Do I need to do something on boot up to log in as 'root'? I think I might.

I would appreciate an accurate concise answer. Please list the steps I need to take to do this.

  • 2
    Possible duplicate of How can I change a set of files Permsissions from Root to user – karel Aug 6 '18 at 14:27
  • 9
    Do not change the ownership of /usr and its subfolders - you will likely break your system – steeldriver Aug 6 '18 at 14:30
  • to login in at root without root password, you can use sudo su but just avoid to connect directly with root; most case just need sudo, more safe – damadam Aug 6 '18 at 14:41
  • 2
    @damadam consider using sudo -i rather than sudo su, sudo -i gives better isolation. help.ubuntu.com/community/… – Panther Aug 6 '18 at 14:54
  • What are you actually trying to achieve? As steeldriver said, changing ownership on /usr is a terrible idea. Almost certainly you should be using sudo to do what you need there, rather than changing ownership or permissions. You can also use sudo to run chmod and chown - there's no need to log in as root for that. – Zanna Aug 6 '18 at 17:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.