bug-patch
[Top][All Lists]
Advanced

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

[bug-patch] Patch forces group of patched files to users primary group


From: Michael Knabe
Subject: [bug-patch] Patch forces group of patched files to users primary group
Date: Mon, 22 Mar 2010 14:32:36 +0100 (CET)

Hi,

I'm not sure if this is considered a bug, a feature or a PEBKAC. However when 
you patch a file using 'patch -p0 < foo.diff' patch sets the gid to the users 
primary gid.
This is quite annoying if you patch a file that should be readable by multiple 
users in the same group. E.g. patch is unusable on our webserver, where the 
http daemon has access via group settings. Whenever I patch a file the daemon 
can no longer access it and I need to repair the group setting manually.

Even with the set gid bit set on the directory patch sets the primary group of 
the patching user.

Tested with:
patch 2.5.9 on Debian 5.0.4

Is there any way to tell patch not to change user and group?

Cheers,
Michael Knabe
-- 
Michael Knabe || e-netconsulting KG
Max-Brauer-Allee 34 || 22765 Hamburg
Tel. +49 40 1 8888 99 47 || Fax +49 40 1 8888 99 800
address@hidden || http://www.e-netconsulting.com
Amtsgericht Hamburg - HRA 103928
Geschäftsführer: Volker Graubaum




reply via email to

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