7 messages in com.perforce.perforce-user[p4] Preserving file permissions
FromSent OnAttachments
Richard Brooksby26 May 2000 03:23 
Jeff A. Bowles26 May 2000 07:29 
Richard Brooksby26 May 2000 07:40 
Scott Blachowicz26 May 2000 08:29 
John Metzger26 May 2000 08:43 
Fredric Fredricson26 May 2000 09:25 
Steve Cogorno26 May 2000 10:17 
Subject:[p4] Preserving file permissions
From:Richard Brooksby (rb@ravenbrook.com)
Date:05/26/2000 07:40:50 AM
List:com.perforce.perforce-user

At 2000-05-26 07:29 -0700, Jeff A. Bowles wrote:

There's a standard utility that was present for a long while (might still be there) on many Unix machines: "vipw" (and "edpw") for editing the password file. Its job was to put a "lock file" in place, change permissions, make backup files, etc.

Why not swipe that idea: "editsysfile passwd" would edit the password file, making its permissions appropriate for a "p4 edit" operation, doing "p4 edit", then dumping you into $EDITOR on the file, then checking in the change and setting the permissions back. (It could use its argument to know which file you're touching, so 'editsysfile motd' would do the appropriate thing, for example.)

Thanks, that helps for editing, but sadly it doesn't help us with our second and third goals:

- restore after failure

- move configuration from one piece of hardware to another

This is a bit like the Apple resource fork problem. On any system there's always some system-specific meta-information that's separate from the file contents.