Results 1 to 6 of 6

Thread: Do I have to use chown?

  1. #1
    Join Date
    Dec 2008
    Location
    Scotland
    Beans
    427
    Distro
    Ubuntu 14.04 Trusty Tahr

    Do I have to use chown?

    I just used the command line to cp some font files to the font folder usr/shar/fonts.

    But I read somewhere that I should also use chown. I'm really rusty on bash scripting and haven't really done any since college. The following input worked fine.

    Code:
    ~/web development/fonts$ sudo cp fontface2 -R /usr/share/fonts
    Smile . . there's always tomorrow.

  2. #2
    Join Date
    Mar 2009
    Beans
    Hidden!

    Re: Do I have to use chown?

    Quote Originally Posted by kapi View Post
    I just used the command line to cp some font files to the font folder usr/shar/fonts.

    But I read somewhere that I should also use chown. I'm really rusty on bash scripting and haven't really done any since college. The following input worked fine.

    Code:
    ~/web development/fonts$ sudo cp fontface2 -R /usr/share/fonts
    Well, chowning is easy.

    sudo chown -R 777 /usr/share/fonts

    might be giving it a quick go;

    tell us how it went!

  3. #3
    Join Date
    Dec 2008
    Location
    Scotland
    Beans
    427
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Do I have to use chown?

    Thanks for the reply,

    The fonts are visible and working so I don't think I need to use chown as I am the only user on my laptop.

    Cheers though
    Smile . . there's always tomorrow.

  4. #4
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Do I have to use chown?

    I wouldn't use chown on system files (anything outside your home folder) unless you know exactly what you're doing. Linux relies on root permissions on system files for much of its functioning.

    Elevating your user privileges with sudo is the proper way to do what you want to do.

  5. #5
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Do I have to use chown?

    Quote Originally Posted by twipley View Post
    Well, chowning is easy.

    sudo chown -R 777 /usr/share/fonts

    might be giving it a quick go;

    tell us how it went!
    This won't work as you expected.

    The command chown changes ownership and it is used like this on a file (or directory) owned by user1
    Code:
    sudo chown user2 somefile
    ...if you wanted to change the group you would use this variation
    Code:
    sudo chown user2:user2 somefile
    The command chmod changes the users permissons (i.e 775) from your 777 like this
    Code:
    sudo chmod 775 somefile
    You can view the gory details here
    Code:
    man chown
    
    man chgrp
    
    man chmod
    -BAB1

  6. #6
    Join Date
    Sep 2011
    Beans
    27

    Re: Do I have to use chown?

    always be cautious before using chown, chmod, chgrp commands. If applied to a wrong file/directory you can screw up your whole installation.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •