Jump to content

changing group and ownership


Recommended Posts

Does anybody know if it's possible to change the group and ownership of an entire directory and its contents (subfolders or files) at once?

i.e.: I have a dir named "mymp3"full of songs and they belongs to root' s group and ownership. When I try:

chown william mymp3 
chgrp william mymp3

only the mymp3 dir is affected by the commands, the contents inside the folders not.

Thanks.

Link to comment
Share on other sites

I think you need the -R parameter to operate on files and directories recursively... :)

Yeah, before posting I had tried adding -R to the command, but it didn't work.

edited to insert the output of the commands:

[root@localhost storage]# chgrp william mymp3 -R
chgrp: changing group of `mymp3/Miles Davis/miles davis - prelude to a kiss.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis - Pharoah\'s Dance.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis - Moon Dreams.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis - Human Nature.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/miles davis - freddie freeloader.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis/Miles Davis - Prelude To A Kiss.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis/Miles Davis - Pharoah\'s Dance.mp3': Operation not permitted
chgrp: changing group of `mymp3/Miles Davis/Miles Davis/Miles Davis - Moon Dreams.mp3': Operation not permitted

Edited by william
Link to comment
Share on other sites

some quick questions:

 

- do you have enough permissions (the owner) to change the file attributes?

- do you have enough permission to change it to target group (are you a member of the target group)?

- the filesystem is not by any chance fat32?

 

thats it. sorry i have only been speed reading. too much work.. :(

 

ciao!

Link to comment
Share on other sites

some quick questions:

 

- do you have enough permissions (the owner)  to change the file attributes?

- do you have enough permission to change it to target group (are you a member of the target group)?

- the filesystem is not by any chance fat32?

 

thats it. sorry i have only been speed reading. too much work.. :(

 

ciao!

This is a FAT32 partition. :wall:

Edited by william
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...