Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 172009
 

How to change the owner of a file in Linux

Answer:

You need to use the chown command:

1. To change the owner of text.txt to john

# chown john /tmp/text.txt

2. To change the owner of text.txt to john, but group identifier to admin.

# chown john:admin /tmp/text.txt

3. To change the group of text.txt to admin

# chown :admin /tmp/text.txt

Reference: http://en.wikipedia.org/wiki/Chown

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>