Download Part 2 - Intranet
Transcript
Appendix B chgrp PURPOSE: This utility is used to change the group affiliation of a file. It is used to maintain the Discretionary Access Control (DAC) system of file permissions in UNIX. FORMAT: chgrp (groupname) (filespec) This utility does not have any switches but it is possible to use wildcards as part of the filespec. The filespec can be one file or a group of files listed separately or grouped with a wildcard. Available wildcards are: * The * (asterisk) stands for any number of characters. To change all files that have start with an S, use the following format: chgrp (groupname) S* Or to change all files that end in .D, use this format: chgrp (groupname) *.D ? Each ? stands for one character – no more, no less. To change all files that have 3-letter names, use this format: chgrp (groupname) ??? Or to change all filenames that start with test and have 2 characters following, use this format: chgrp (groupname) test?? Or you can store a list of files in a file to be used as redirected input for the utility. For example, a file called filelist was created using “ls” and all files within it are to be changed: chgrp billw < filelist PROCEDURE: 1 From the system prompt, enter chgrp, the new group’s name, and the filespec. The files are changed and you are returned to the system prompt. NOTES: Since this utility is part of the DAC system, it is important to be aware of the security related issues. The significance of the group of the file comes from the relationship of the group and the file permissions for the group. When listing a long directory of a file, the second three permission fields are those that control file permissions for the group of the file. Any user who is not the owner of the file but is identified as belonging to the same group as the file will have those permissions for that file. Dim3D (Rev. 10.0) 197