File Ownership Commands: Difference between revisions

From UNIX Systems Administration
Jump to navigation Jump to search
(Created page with "== Linux File Ownership Commands == === No User Corresponds to File's Numeric User ID === #: '''<tt># find <directory> -nouser print0 | xargs -0 chown <new user></tt>''' ===...")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Linux File Ownership Commands ==
== Linux File Ownership Commands ==
=== No User Corresponds to File's Numeric User ID ===
# No User Corresponds to File's Numeric User ID
#: '''<tt># find <directory> -nouser print0 | xargs -0 chown <new user></tt>'''
#: '''<tt># find <directory> -nouser -print0 | xargs -0 chown <new user></tt>'''
=== Using Access Control Lists ===
# No Group Corresponds to File's Numeric Group ID
#: '''<tt># find <directory> -nogroup -print0 | xargs -0 chgrp <new group></tt>'''
 
== AIX File Ownership Commands ==
# No User Corresponds to File's Numeric User ID
#: '''<tt># find <directory> -nouser | xargs chown -h <new user></tt>'''
# No Group Corresponds to File's Numeric Group ID
#: '''<tt># find <directory> -nogroup | xargs chgrp -h <new group></tt>'''
 
== Further Reading ==
== Further Reading ==
# [http://www.techrepublic.com/article/learn-to-use-extended-filesystem-acls/6091748 Learn to use extended filesystem ACLs]
# [http://linux.about.com/library/cmd/blcmdl1_setfacl.htm Linux/Unix command: setfacl]
# [http://linux.about.com/library/cmd/blcmdl1_getfacl.htm Linux/Unix command: getfacl]




[[Category:AIX]]
[[Category:Linux]]
[[Category:Linux]]

Latest revision as of 02:18, 3 December 2021

Linux File Ownership Commands

  1. No User Corresponds to File's Numeric User ID
    # find <directory> -nouser -print0 | xargs -0 chown <new user>
  2. No Group Corresponds to File's Numeric Group ID
    # find <directory> -nogroup -print0 | xargs -0 chgrp <new group>

AIX File Ownership Commands

  1. No User Corresponds to File's Numeric User ID
    # find <directory> -nouser | xargs chown -h <new user>
  2. No Group Corresponds to File's Numeric Group ID
    # find <directory> -nogroup | xargs chgrp -h <new group>

Further Reading