Page 1 of 1

Linux command

Posted: Thu May 11, 2017 10:10 pm
by rajbirsingh9725
CHOWN

The chown command changes the user and/or group that owns a file. It normally needs to be run as root using sudo e.g. sudo chown pi:root *filename* will change the owner to pi and the group to root.

I am not getting the function of this command.
Owner to pi and the group to root
please explain.........

Re: Linux command

Posted: Fri May 12, 2017 12:46 am
by kusti8
In Linux everything has a permission. So you can for example set a file to have read write execute privileges for everyone, meaning anyone can read if, write it, or execute it. There are three permissions for every file. One for the user that is the owner, one to a group, and one to everyone else. So you can make that the owner can do everything, the group and only read and execute, and everyone else can only execute.

Groups are just a collection of users. Your user is in many different groups.

Re: Linux command

Posted: Fri May 12, 2017 2:48 am
by stderr
rajbirsingh9725 wrote:I am not getting the function of this command.
Owner to pi and the group to root
please explain.........
Type:

ls -lh

and you'll see each file with its permissions, owner, size and name. There are command line programs for changing the owner, the group, the permissions and the name of those files, e.g.:

chmod
chown
mv

Re: Linux command

Posted: Sat May 13, 2017 5:14 am
by rajbirsingh9725
Thanks ....for your help. Now i get that point, that what it really want to convey.