Monday, 1 April 2013
Changing File Ownership IN LINUX
Changing File Ownership
- Only root can change a file's owner
- Only root or the owner can change a file's group
- ownership is changed with shown:
- crown [-R] user_name file/directory...
File ownership can be changed with the chown command.For example,to
grant ownership of the file foofile to student,the following commands could be used:
[root@station ~]$ chown student foofile
Chown can be used with the -R option to recursively change the ownership of an entire directory tree.The following command would grant ownership of foodir and all files and sub-directories within it to student:
[root@station ~]$ chown -R student foodie
Only root can change the ownership of a file.Group ownership,however,can be set by root or the file's owner.Root can change the ownership to any group,while non-root users can grant ownership only to groups they belong to.Changing the group ownership of a file is done with the chgrp command.The syntax is identical to that of chown,including the use of -R to affect entire directory trees.
THANK YOU FOR VISITED GURU NETWORK I HOPE LIKE THIS ARTICLE
Author: Kuldipsinh
Hi! I am Kuldipsinh,a certified Indian Network Consultant,Pro Blogger,Computer Engineer Software Editor and an addicted Web Developer. Read More →
Related Posts:
COMMAND LINUX
Subscribe to:
Post Comments (Atom)
0 comments: