You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, December 15th 2003, 6:33pm

chown and chgrp

I have a question.
How can I change the owner and the group owner for a directory or a file?
give me an example for the whole command.

seb

Professional

Posts: 622

Location: Sydney

Occupation: Student

  • Send private message

2

Tuesday, December 16th 2003, 8:43am

[code:1]
[seb@localhost seb]$ chgrp -Rv seb music
group of `music' retained as seb
group of `music/wheel_of_fortune.mid' retained as seb
group of `music/TV Theme - Wheel Of Fortune.mp3' retained as seb
group of `music/new' retained as seb
group of `music/new/1.jpg' retained as seb
group of `music/new/1.wmv' retained as seb
group of `music/new/4.mpg' retained as seb
group of `music/new/5.mpg' retained as seb
[seb@localhost seb]$
[/code:1]
-R => recursive
-v => verbose, tell me all that is happening.

its the same for chown

[code:1]
[seb@localhost seb]$ chown -Rv seb music
ownership of `music' retained as seb
ownership of `music/wheel_of_fortune.mid' retained as seb
ownership of `music/TV Theme - Wheel Of Fortune.mp3' retained as seb
ownership of `music/new' retained as seb
ownership of `music/new/1.jpg' retained as seb
ownership of `music/new/1.wmv' retained as seb
ownership of `music/new/4.mpg' retained as seb
ownership of `music/new/5.mpg' retained as seb
[seb@localhost seb]$
[/code:1]

for more, do

chgrp --help
chown --help

3

Wednesday, December 17th 2003, 9:23am

You can also use only chown:

chown user:group <file/directory>

Andreas
Mit freundlichem Gruss / Sincerely
Andreas Woithon
PGP/GPG Fingerprint: 9C83 F58D 7B9C B6C8 FA92 227B A10D 741D 24C9 74F1
Keyserver: blackhole.pca.dfn.de:11371

4

Wednesday, December 17th 2003, 9:27am

Quoted

Original von AWo

You can also use only chown:

chown user:group <file/directory>

Andreas


or add -R for recursive

i.e. chown -R user:group <directory>

this way all files and subfolders will be changed! :D
The Best Games are for Download @ GCCLINUX