Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
making a group or user own a directory's contents
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
brazilian_joe
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2003
Posts: 99

PostPosted: Wed Sep 17, 2003 9:31 pm    Post subject: making a group or user own a directory's contents Reply with quote

I would like to have all files copied to a directory to ignore the group (and maybe user) in its source location and acquire the group (and/or user) of the directory where it is being copied to. Is it possible? Yes, I can just chgrp, I want automation, I want it to happen unnattended.
Back to top
View user's profile Send private message
ectospasm
l33t
l33t


Joined: 19 Feb 2003
Posts: 711
Location: Mobile, AL, USA

PostPosted: Wed Sep 17, 2003 9:59 pm    Post subject: Reply with quote

Only way I know of doing that is if I'm copying some file into my home directory, which changes the user to my username and group to my primary group. This is probably not what you want. Best thing to do is write a script to do it, and use chgrp and cp in the script. I'm not much for writing scripts, so I direct you to your shell's manual.
_________________
Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance!
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Wed Sep 17, 2003 10:15 pm    Post subject: Reply with quote

Isn't this where the sticky bit on a directory comes in useful? I had a play with chmod +t but I couldn't seem to figure out how it works.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Thu Sep 18, 2003 1:01 am    Post subject: Reply with quote

Check out https://forums.gentoo.org/viewtopic.php?t=83824
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Thu Sep 18, 2003 1:19 am    Post subject: Reply with quote

Apologies - not the sticky bit but the 'set group ID on execution bit' - seems it's commonly confused.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum