HPUX chown[1]



chown in anderen Kapiteln des hpux Handbuch: chown.2




 chown(1)                                                           chown(1)





 NAME
      chown, chgrp - change file owner or group

 SYNOPSIS
      chown [-R] owner[:group] file ...

      chgrp [-R] group file ...

 DESCRIPTION
      chown changes the owner ID of one or more files to owner and
      optionally the group ID of one or more files to group.  The owner can
      be either a decimal user ID or a login name found in the password
      file.  The group can be either a decimal group ID or a group name
      found in the group file.

      chgrp changes the group ID of files to group.

      In order to change the owner or group, you must own the file or have
      appropriate privileges.  If either command is invoked on a regular
      file by other than the super-user, the set-user-ID and set-group-ID
      bits of the file mode (04000 and 02000 respectively) are cleared.
      Note that a given user's or group's ability to use this command can be
      restricted by setprivgrp (see setprivgrp(1M)).

      When using chown or chgrp on symbolic links, the owner or group of the
      symbolic link is changed.

    Access Control Lists (ACLs)
      Users can permit or deny specific individuals and groups to access a
      file by setting optional ACL entries in the file's access control list
      (see acl(5)).  When using chown in conjunction with ACLs, if the new
      owner and/or group of a file does not have an optional ACL entry
      corresponding to u.% and/or %.g in the file's access control list, the
      file's access permission bits remain unchanged.  However, if the new
      owner and/or group is already designated by an optional ACL entry of
      u.% and/or %.g in the file's ACL, chown sets the corresponding file
      access permission bits (and the corresponding base ACL entries) to the
      permissions contained in that entry.

    Options
      -R      Recursively change the owner or group.  For each file operand
              that names a directory, the owner or group of the directory
              and all files and subdirectories in the file hierarchy below
              it are changed.

 EXTERNAL INFLUENCES
    International Code Set Support
      Single- and multi-byte character code sets are supported.

 RETURN VALUE
      chown and chgrp return the following values:



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 chown(1)                                                           chown(1)





            0      Successful completion.
           >0      Error condition occured.

 EXAMPLES
      The following command changes the owner of the file jokes to sandi:

           chown sandi jokes

      To execute this command, you must be either the owner of jokes or a
      user who has appropriate privileges.

      The following command searches the directory design_notes and changes
      each file in that directory to owner mark and group users:

           chown -R mark:users design_notes

 WARNINGS
    Access Control Lists
      Access control list descriptions in this entry apply only to standard
      HP-UX operating systems.  If HP-UX BLS software has been installed,
      access control lists are handled differently.  Refer to HP-UX BLS
      documentation for information about access control lists in the HP-UX
      BLS environment.

 FILES
      /etc/group
      /etc/passwd

 SEE ALSO
      chmod(1), setprivgrp(1M), chown(2), group(4), passwd(4), acl(5).

 STANDARDS CONFORMANCE
      chown: SVID2, XPG2, XPG3, POSIX.2

      chgrp: SVID2, XPG2, XPG3, POSIX.2



















 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992