FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-17-2009, 10:45 PM
"Oliver Schneider"
 
Default Restoring file permissions from package database?

Hi,

is there any way in Debian (4.0 or 5.0) to restore the file permissions - mainly of files inside /etc/ - from the cached packages or the package database or so?

The only other chance I see - without reinstalling - would be to install all those packages into a dummy installation (e.g. in a VM) and use that as a template for the existing installation. Is there a better method?

Thanks in advance for your help,

// Oliver


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-17-2009, 11:10 PM
"Douglas A. Tutty"
 
Default Restoring file permissions from package database?

On Wed, Feb 18, 2009 at 12:45:30AM +0100, Oliver Schneider wrote:
> is there any way in Debian (4.0 or 5.0) to restore the file
> permissions - mainly of files inside /etc/ - from the cached packages
> or the package database or so?
>
> The only other chance I see - without reinstalling - would be to
> install all those packages into a dummy installation (e.g. in a VM)
> and use that as a template for the existing installation. Is there a
> better method?

I've never had to do it for all of /etc.

Some packages come with /etc files in the deb, others create the
/etc files in their install script. To use the packages, you'd have to
look in the deb for the files or in their scripts.

To look into debs, I use midnight commander.

You could alwasy ask someone to give you an ls -alR /etc.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-18-2009, 09:43 AM
"Oliver Schneider"
 
Default Restoring file permissions from package database?

Douglas, thanks!

> Some packages come with /etc files in the deb, others create the
> /etc files in their install script. To use the packages, you'd have to
> look in the deb for the files or in their scripts.
>
> To look into debs, I use midnight commander.
Okay, but in any case there is nothing like dpkg-reconfigure to restore permissions, I take it?!

> You could alwasy ask someone to give you an ls -alR /etc.
The "ls -alR /etc" is what I had in mind with a VM that would have all the packages.


// Oliver
--
---------------------------------------------------
DDKWizard and DDKBUILD: <http://ddkwizard.assarbad.net>

Trunk (potentially unstable) version: <http://ddkwizard.assarbad.net/trunk/ddkbuild.cmd>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-18-2009, 01:24 PM
"Douglas A. Tutty"
 
Default Restoring file permissions from package database?

On Wed, Feb 18, 2009 at 11:43:48AM +0100, Oliver Schneider wrote:
> Douglas, thanks!
>
> > Some packages come with /etc files in the deb, others create the
> > /etc files in their install script. To use the packages, you'd have
> > to look in the deb for the files or in their scripts.
> >
> > To look into debs, I use midnight commander.
> Okay, but in any case there is nothing like dpkg-reconfigure to
> restore permissions, I take it?!

Not that I know of.

>
> > You could alwasy ask someone to give you an ls -alR /etc.
> The "ls -alR /etc" is what I had in mind with a VM that would have all
> the packages.

I'd suggest that you print out your existing ls -alR /etc. Then get
someone to send you theirs in a file. You can then go down and write in
what the ownership/permissions should be. Any files you have that
weren't in the list you received could be asked for specifically on the
list or pulled from the packages. However, its a lot of work to go
through each package individually.

I know, its a lot of work either way.

You could always reinstall???

I take it that you don't have a backup of /etc from right after you
installed?

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-19-2009, 10:18 AM
Richard Lyons
 
Default Restoring file permissions from package database?

On Wed, Feb 18, 2009 at 09:24:15AM -0500, Douglas A. Tutty wrote:

> On Wed, Feb 18, 2009 at 11:43:48AM +0100, Oliver Schneider wrote:
[...]
> However, its a lot of work to go
> through each package individually.
>
> I know, its a lot of work either way.

But you could write a bash script to do the actual comparing and chmod-ing
once you have either a list or a clean installed copy. (back it up before
running the script for real of course).

richard


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 12:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org