Find the answer to your Linux question:
Results 1 to 3 of 3
What is the best command for adding groups to a file?...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Location
    McDonough Ga
    Posts
    5

    Adding groups in CLI

    What is the best command for adding groups to a file?

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    Are you talking about changing the group ownership of the file? You can do it with either chown or chgrp but you need root access to use chown; chgrp was invented so that ordinary users could change group ownership.

    A file can be owned by only one group at a time. If you just want to widen access to the file, it's best to change its permissions with chmod to make it world-readable.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    If you want to change the controlling group of a file, then hazel is 100% correct.

    If you are trying to add groups to the system, or change who is a member of what groups, you can use the groupadd and gpasswd commands.
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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