Change File Owner & Group in UNIX & Linux

1. Determine the current file owner and group.

# ls -lrt test.txt
-rwxr-xr-x  1 root root 54 Mar  4  2005 test.txt

2. Change the file owner and group. Original syntax, # chown username:usergroup <file-name>

# chown itsiti:itsiti test.txt

3. Verify

# ls -lrt test.txt
-rwxr-xr-x  1 itsiti itsiti 54 Mar  4  2005 test.txt

You May Also Like

Leave a Reply?