Re: [SLUG] chgrp question and/or problem.

2004-01-15 Thread Jobst Schmalenbach
On Thu, Jan 15, 2004 at 03:22:02PM +1100, Michael Chesterton ([EMAIL PROTECTED]) wrote:
 Jobst Schmalenbach [EMAIL PROTECTED] writes:
 
  I havent had to do this for a while ie change group status as a
  USER, but now I do ...
 
 You need to be a member of the group you're chgrp'ing to.

Mmmh, that did work.

The last time I had to do this was when I was administering
Solbournes/Irixes (dont know which one I had to do this)
and it worked on there.

It surprised me I had to be IN that group ..



jobst





-- 
The email address in this email is used for Mailing Lists Only. 
Please reply ONLY to the list email address, do not reply to the
email directly.

You win some, you loose some.


 __, Jobst Schmalenbach, Technical Director
   _ _.--'-n_/   Barrett Consulting Group P/L  The Meditation Room P/L  
 -(_)--(_)=  +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] chgrp question and/or problem.

2004-01-14 Thread Jobst Schmalenbach

all,

I havent had to do this for a while ie change group status as a
USER, but now I do ...


/tmp is a mounted partition.

[127] [EMAIL PROTECTED] ~ ls -la /tmp
total 7760
drwxrwxrwt   19 root root16384 Jan 15 12:38 .
drwxr-xr-x   27 root root 4096 Oct 22 23:20 ..
[snip]

[128] [EMAIL PROTECTED] ~ touch aa
[129] [EMAIL PROTECTED] ~ chgrp apache aa
chgrp: changing group of `aa': Operation not permitted
[130] [EMAIL PROTECTED] ~ ls -la aa
-rw-r--r--1 bundah   bundah  0 Jan 15 12:40 aa


My understanding is:

Some files can't be chown()'ed at all: files on read-only filesystem, immutable and 
append-only ones.
Otherwise root can change UID and GID as it wishes.
Non-root can't change UID of file.
Non-root can't change GID of file if he isn't the owner.
If non-root owns a file it can change the GID to any of the groups the changing 
process belongs to. Any change of GID is subject to quotas.
Both for root and non-root processes:
 Change of UID turns suid off.
 Change of GID for group-executable turns sgid off.
...
...



How come I cant change that bloody UID?
(I can if I su root).


jobst




-- 
The email address in this email is used for Mailing Lists Only. 
Please reply ONLY to the list email address, do not reply to the
email directly, it gets send to /dev/null.

Why don't sheep shrink when it rains?


 __, Jobst Schmalenbach, Technical Director
   _ _.--'-n_/   Barrett Consulting Group P/L  The Meditation Room P/L  
 -(_)--(_)=  +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] chgrp question and/or problem.

2004-01-14 Thread Michael Chesterton
Jobst Schmalenbach [EMAIL PROTECTED] writes:

 I havent had to do this for a while ie change group status as a
 USER, but now I do ...

You need to be a member of the group you're chgrp'ing to.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html