Take ownership of files as admin

8,542

You can change the ownership of files using the chown command. Run man chown to read the documentation. In short, you can use it as sudo chown USERNAME:GROUPNAME file.

BUT:
I would not recommend changing the ownership of file outside your home directory! See Changed owner of /usr/bin and Changed permissions of / to user to see what happens when you do it.

Share:
8,542

Related videos on Youtube

Beacher72
Author by

Beacher72

Updated on September 18, 2022

Comments

  • Beacher72
    Beacher72 over 1 year

    I'm somewhat new to Ubuntu but have been learning a lot on my own. I am an admin user for my PC. However, when I try to take ownership of most folders, like usr/local, it says I don't have permission and I'm not able to change any permissions. It doesnt make any sense because I'm the only one who uses this PC and I'm an admin. I even tried taking ownership using the terminal with no luck. Any suggestions would be greatly appreciated. I'm also using Ubuntu 14.0

    • Mofty
      Mofty over 8 years
      I think this post will help you a lot: change ownership
    • TellMeWhy
      TellMeWhy over 8 years
      are you using sudo?
    • TheWanderer
      TheWanderer over 8 years
      What command are you trying with the terminal?
    • user68186
      user68186 over 8 years
      There is a reason Ubuntu is more secure than Window. The admin user does not own the system files in folders like /usr/local/. Messing with ownership of these files will probably give you a system that does not boot. In general follow this advice: pinterest.com/pin/399342691928194426
    • Admin
      Admin over 8 years
      As discussed, don't do this. Or at least understand what you are doing, and maybe take a step back and ask what are you actually trying to achieve by hacking perms in /usr. What is the end-goal here?
  • muru
    muru over 8 years
    How? Can you provide a screenshot, or some instructions?
  • muru
    muru over 8 years
    In the answer, please.