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>''' ===...")
 
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>'''
=== No User Corresponds to File's Numeric Group ID  ===
#: '''<tt># find <directory> -nogroup -print0 | xargs -0 chgrp <new group></tt>'''
 
=== Using Access Control Lists ===
=== Using Access Control Lists ===
== Further Reading ==
== Further Reading ==

Revision as of 23:02, 2 December 2021

Linux File Ownership Commands

No User Corresponds to File's Numeric User ID

  1. # find <directory> -nouser -print0 | xargs -0 chown <new user>

No User Corresponds to File's Numeric Group ID

  1. # find <directory> -nogroup -print0 | xargs -0 chgrp <new group>

Using Access Control Lists

Further Reading

  1. Learn to use extended filesystem ACLs
  2. Linux/Unix command: setfacl
  3. Linux/Unix command: getfacl