bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

chmod


From: Michael_Konikoff
Subject: chmod
Date: Thu, 6 Apr 2006 12:25:49 -0400

Why should I not be permitted to change the group permissions on a file
owned by another user in the group, when the group ownership of the file
and parent directory is set to a group to which we both belong? Sorry if
this is not a bug, it's just incomprehensible to me that using the same
user/group/permissions and a different method I can essentially  accomplish
what chmod says is not permitted.

Consider the following:

address@hidden test]$ ls -al
total 12
drwxrwxr-x   2 mike  www 4096 Apr  6 12:03 .
drwxr-x---  11 mike  www 4096 Apr  6 12:03 ..
-rw-rw-r--   1 sarah www   15 Apr  6 12:03 testFile

address@hidden test]$ chmod g+x testFile
chmod: changing permissions of `testFile': Operation not permitted

address@hidden test]$ cp testFile testFile2

address@hidden test]$ chmod g+x testFile2

address@hidden test]$ mv testFile2 testFile
mv: overwrite `testFile', overriding mode 0664? y

address@hidden test]$ ls -al
total 12
drwxr-xr-x   2 mike www 4096 Apr  6 12:04 .
drwxr-x---  11 mike www 4096 Apr  6 12:03 ..
-rw-rwxr--   1 mike www   15 Apr  6 12:04 testFile

So it's OK if I overwrite the file with a copy that has the group
permissions set the way I want. This doesn't make sense to me. The only
difference I can see between allowing group permissions to be set directly
vs. indirectly is that now the file is owned by mike:www instead of
sarah:www. So if this is the reason "Operation not permitted", why not make
chmod able to check if current user has write permissions on file and
parent directory, and if so, change the group permissions as requested, and
change the owner to the current user?

I don't want to use the sticky bit on the parent directory, because I want
group members be able to remove/rename other group member's files in this
directory.

Michael Konikoff
URS Corporation Southern (Tallahassee)
1625 Summit Lake Drive
Tallahassee, Florida 32317
Direct: 850.402.6338
Office: 850.574.3197
Fax: 850.205.3246
address@hidden

This e-mail and any attachments are confidential. If you receive this
message in error or are not the intended recipient, you should not retain,
distribute, disclose or use any of this information and you should destroy
the e-mail and any attachments or copies.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]