1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change directory owner and all it's subdirectories

Discussion in 'Linux & Open Source' started by nav..., 7 Feb 2006.

  1. nav...

    Hitman

    Joined: 2 Apr 2004

    Posts: 674

    Location: Melbourne

    Hi,

    I was wondering if anyone could tell me the correct command to change the owner of a directory called media and all it's subdirectories to a user named dave.

    I know I need to use the chown command, but I'm not sure of the exact syntax or which folder I need to run it from.

    media is currently sat in the "html" folder.

    many thanks

    Adrian
     
  2. Rudeboy

    Wise Guy

    Joined: 20 Oct 2002

    Posts: 1,218

    Location: Melbourne Australia

    "chown -R dave /html/media"
     
  3. whitecrook

    Sgarrista

    Joined: 22 Aug 2005

    Posts: 8,360

    Location: Clydebank

    man chown