And so there was this guy who performed a chmod -R 770 /. That's funny, but what to do when you have to repair the machine ? You can extract all the original permissions from the RPM database :
#!/usr/bin/perl
use strict; use URPM;
URPM::DB::open()->traverse(sub { my ($package) = @_; my $name = $package->fullname; my @modes = $package->files_mode; printf "$name:$_:%04o\n",(shift @modes) & 07777 for $package->files; });
Re:number of lines.
rafael on 2004-07-03T21:56:06
This is left as an exercise to the reader:) Re:number of lines.
jdavidboyd on 2004-07-05T15:25:00
Ah,
Good thing I don't need any exercise!