Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Syntax  





3 Frequently implemented options  





4 Example  





5 See also  





6 References  





7 External links  














chgrp






العربية
Azərbaycanca
Català
Čeština
Deutsch
Ελληνικά
Español
فارسی
Français

ि
Hrvatski
Italiano

Magyar

Polski
Português
Română
Русский
Türkçe
Українська
Tiếng Vit

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


chgrp
Developer(s)AT&T Bell Laboratories
Initial releaseMay 1975; 49 years ago (1975-05)
Written inPlan 9: C
Operating systemUnix, Unix-like, Plan 9, Inferno, IBM i
PlatformCross-platform
TypeCommand
LicensePlan 9: MIT License

The chgrp (from change group) command may be used by unprivileged users on various operating systems to change the group associated with a file system object (such as a computer file, directory, or link) to one of which they are a member. A file system object has 3 sets of access permissions, one set for the owner, one set for the group and one set for others. Changing the group of an object could be used to change which users can write to a file.

History[edit]

The chgrp command was originally developed as part of the Unix operating system by AT&T Bell Laboratories.

It is also available in the Plan 9 and Inferno operating systems and in most Unix-like systems.

The chgrp command has also been ported to the IBM i operating system.[1]

Syntax[edit]

chgrp [options] group FSO

Frequently implemented options[edit]

-R recurse through subdirectories.

-v verbosely output names of objects changed. Most useful when "FSO" is a list.

-f force or forge ahead with other objects even if an error is encountered.

Example[edit]

$ ls -l *.conf
-rw-rw-r--   1 gbeeker  wheel          3545 Nov 04 2011  prog.conf
-rw-rw-r--   1 gbeeker  wheel          3545 Nov 04 2011  prox.conf
$ chgrp staff *.conf
$ ls -l *.conf
-rw-rw-r--   1 gbeeker  staff          3545 Nov 04 2011  prog.conf
-rw-rw-r--   1 gbeeker  staff          3545 Nov 04 2011  prox.conf

The above command changes the group associated with file prog.conf from wheeltostaff (provided the executing user is a member of that group). This could be used to allow members of staff to modify the configuration for programs prog and prox.

See also[edit]

References[edit]

  1. ^ IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). IBM. Archived (PDF) from the original on 2020-09-18. Retrieved 2020-09-05.

External links[edit]


Retrieved from "https://en.wikipedia.org/w/index.php?title=Chgrp&oldid=1171224228"

Categories: 
Operating system security
Standard Unix programs
Unix SUS2008 utilities
Plan 9 commands
Inferno (operating system) commands
IBM i Qshell commands
Hidden categories: 
Articles with short description
Short description is different from Wikidata
 



This page was last edited on 19 August 2023, at 19:48 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki