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-10-2008, 07:13 AM
Kamaraju S Kusumanchi
 
Default restoring the correct permissions for /var

Can some one please tell me how to restore the correct permissions for
directories and files in /var? Basically I copied the /var partition of my
computer to a spare hard drive, repartitioned the disk and copied the /var
partition back. However, during the process, the file permissions were not
preserved (as I was not being careful about it). Now every file in /var has
permissions like

drwxr-xr-t 4 root root 4096 2008-02-09 17:10 lock/
drwxr-xr-t 6 root root 4096 2008-02-10 03:03 tmp/

which does not make any sense. So I changed them using

chmod a+rwx /var/tmp /var/lock

But I don't know what the permissions of other files should be.

Also, when I log in into KDE as a user, it hangs up at "initializing system
services". This did not happen before. I am thinking this is somehow
related to the permissions of files in /var (since both the problems
occured after the /var transfer). Does anyone know the solution for this?

thanks
raju
--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 11:39 AM
"Douglas A. Tutty"
 
Default restoring the correct permissions for /var

On Sun, Feb 10, 2008 at 03:13:51AM -0500, Kamaraju S Kusumanchi wrote:
> Can some one please tell me how to restore the correct permissions for
> directories and files in /var? Basically I copied the /var partition of my
> computer to a spare hard drive, repartitioned the disk and copied the /var
> partition back. However, during the process, the file permissions were not
> preserved (as I was not being careful about it). Now every file in /var has
> permissions like
>
> drwxr-xr-t 4 root root 4096 2008-02-09 17:10 lock/
> drwxr-xr-t 6 root root 4096 2008-02-10 03:03 tmp/
[snip]
> Does anyone know the solution for this?

Well, that's an oops.

I don't suppose you have another box with the same packages installed?
This is the problem.

I just did an:

dtutty@titan:/var$ ls -Rl| wc

and got

5502 44187 305254

Which means there are 5502 files to which I have access (line count),
and if I email it to you, it will be 305254 bytes.

I can do it as root and email it to you (after I ensure that there's
no security issues in that). However, then you're left fixing 5000
files or so.

You'd probably want to write a script.

Let me know.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 12:29 PM
Tzafrir Cohen
 
Default restoring the correct permissions for /var

On Sun, Feb 10, 2008 at 03:13:51AM -0500, Kamaraju S Kusumanchi wrote:
> Can some one please tell me how to restore the correct permissions for
> directories and files in /var? Basically I copied the /var partition of my
> computer to a spare hard drive, repartitioned the disk and copied the /var
> partition back. However, during the process, the file permissions were not
> preserved (as I was not being careful about it). Now every file in /var has
> permissions like
>
> drwxr-xr-t 4 root root 4096 2008-02-09 17:10 lock/
> drwxr-xr-t 6 root root 4096 2008-02-10 03:03 tmp/
>
> which does not make any sense. So I changed them using
>
> chmod a+rwx /var/tmp /var/lock
>
> But I don't know what the permissions of other files should be.
>
> Also, when I log in into KDE as a user, it hangs up at "initializing system
> services". This did not happen before. I am thinking this is somehow
> related to the permissions of files in /var (since both the problems
> occured after the /var transfer). Does anyone know the solution for this?

Maybe you can use rsync -a to restore the permissions? Provided you
didn't change anything in the target...

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 01:13 PM
Kamaraju S Kusumanchi
 
Default restoring the correct permissions for /var

Douglas A. Tutty wrote:


> dtutty@titan:/var$ ls -Rl| wc
>
> and got
>
> 5502 44187 305254
>
> Which means there are 5502 files to which I have access (line count),
> and if I email it to you, it will be 305254 bytes.

But I do not think permissions on all the files is a crucial thing. For
example, you might be having lot of packages under /var/cache/apt/archives/
which might explain that huge number. I am able to install and remove
packages. So the problem might not be with /var/cache/apt/archives
permissions.

I am more interested in the permissions of files which kde looks into.

thanks
raju

--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2008, 02:13 PM
"Douglas A. Tutty"
 
Default restoring the correct permissions for /var

On Sun, Feb 10, 2008 at 09:13:49AM -0500, Kamaraju S Kusumanchi wrote:
> Douglas A. Tutty wrote:
> > dtutty@titan:/var$ ls -Rl| wc
> >
> > and got
> >
> > 5502 44187 305254
> >
> > Which means there are 5502 files to which I have access (line count),
> > and if I email it to you, it will be 305254 bytes.
>
> But I do not think permissions on all the files is a crucial thing. For
> example, you might be having lot of packages under /var/cache/apt/archives/
> which might explain that huge number. I am able to install and remove
> packages. So the problem might not be with /var/cache/apt/archives
> permissions.
>
> I am more interested in the permissions of files which kde looks into.

I don't have anything in /var/cache/apt/archives.

I have not idea what kde looks into. I use Konqueror but I don't have
KDE installed (I use icewm).

The only other choice which I can see is to run aptitude, select the
installed-packages meta-line, and tell aptitude to reinstall everything.
Since the system runs, it won't be down during the reinstall.

Doug.


--
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 09:39 AM.

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