[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: GUI suggestions
From:       Yves Arrouye <yves () realnames ! com>
Date:       1999-10-03 20:45:16
[Download RAW message or body]


> > Then we can rename the "Permissions" tab to Change Permissions" and display it
> > iff the user has the ability to modify these settings.
> >
> > What do you think ?
> needs to be refined.
> When can somebody change permissions on a file, generally ?

Only the owner of a file or root can change its permissions. Being in a
group that can write the file is not enough, regardless of whether you
can write the directory or not. The mask on the directory apply only
when you need to its change the directory itself (either to change its
perms or create a file inside it). So let's take a simple case:

marin% groups
yves users wheel
marin% sudo zsh
marin# umask 022; cd /tmp && mkdir test-perms && cd test-perms
marin# touch yves-file && chown yves.yves yves-file
marin# touch users-file && chown root.users users-file && chmod 664
users-file
marin# ls -l
-rw-rw-r--   1 root     users      0 Oct  3 13:35 users-file
-rw-r--r--   1 yves     yves       0 Oct  3 13:35 yves-file
marin# exit
marin% cd /tmp/test-perms
marin% chmod a+w yves-file && ls -l yves-file
-rw-rw-rw-   1 yves     yves       0 Oct  3 13:36 yves-file
marin% chmod a-w users-file && ls -l users-file
chmod: users-file: Operation not permitted
marin%

Actually, rather than this length illustration, a simple check of
chmod(2) is enough.

So it looks like there is no need to bolden permissions if the user is
displayed, as you can tell from that?

Yves.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic