Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2003
    Posts
    389

    chown not changing owner:group!

    Hi all.

    I have just restored an account to my directadmin box and it appears to have restored with the wrong owner / group.

    Easy I thought, a quick 'chmod secure.secure -R *' should crack that but how wrong was I.

    After running that I get the error: chown: invalid option -- o

    Now - both the user and the group exist, so why won't the files change owner and group?!

    Any help appreciated

    Cheers

  2. #2
    chmod is used to change chmod, not owner/group.
    to change file owner and/or group use:
    chown user:group file.bin

  3. #3
    Join Date
    Mar 2003
    Posts
    389
    my mistake in the title - its chown I am using!
    See what its doing to me - driving me batty!

  4. #4
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Try below,

    chown -R user.group /path/to/folder/
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  5. #5
    Join Date
    Mar 2003
    Posts
    389
    Ok that worked but whats the difference between that and what I did?

    Almost sure I have done it my way before but could be wrong - its been one of those days!

    Cheers
    Ry

  6. #6
    Join Date
    Jan 2006
    Location
    Athens, Greece
    Posts
    1,479
    the options should go right before the owner:group.

    man chown

    man comes handy some times.

  7. #7
    Join Date
    Sep 2007
    Location
    Vijayawada
    Posts
    185
    Are you using : (colon) or . (dot) between owner and group?
    TUXG Hosting - shared hosting simplified
    Linux | BSD ~ Joomla | Drupal
    o 99.9% Uptime o Anytime Phone Support o 30-day Moneyback

Posting Permissions

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