- Subject: Re: jed doesn't maintain group owner
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Thu, 3 Aug 2006 12:40:29 -0400
V01D <phreakuencies@xxxxxxxxx> wrote:
>[root@pris kickstart]# chgrp nobody config.xml
>[root@pris kickstart]# ls -l config.xml
>-rw-rw-r-- 1 v01d nobody 735 2006-07-28 20:56 config.xml
>[root@pris kickstart]# exit
>[v01d@pris kickstart]$ jed config.xml (edit & save here)
>[v01d@pris kickstart]$ ls -l config.xml
>-rw-rw-r-- 1 v01d users 735 2006-07-28 20:57 config.xml
Another user reported this problem and I have been able to reproduce
it. Unfortunately, I do not believe there is anything I can do about
it. Unless you are a member of the group that you are trying to
preserve, or running with the proper privileges, the chown system call
will fail. In fact, here is what the man page says about chown:
These system calls change the owner and group of the file specified by
path or by fd. Only a privileged process (Linux: one with the
CAP_CHOWN capability) may change the owner of a file. The owner of a
file may change the group of the file to any group of which that owner
is a member. A privileged process (Linux: with CAP_CHOWN) may change
the group arbitrarily.
You can put
BACKUP_BY_COPYING = 1;
in your .jedrc file. Then jed will create a backup file by coping it,
and the overwrite the new file, preserving its group id. However, the
group will not be preserved for the backup file. For example, you
should see something like:
[v01d@pris kickstart]$ ls -l config.xml*
-rw-rw-r-- 1 v01d nobody 735 2006-07-28 20:56 config.xml
-rw-rw-r-- 1 v01d users 735 2006-07-28 20:57 config.xml~
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]