Subject: Help: how to fix ownership of /var /.. ?

From: [email-masked]
Date: Wed, 21 Aug 96 10:28:25 cet

(reposting looking forward to get some answers)

Hi Debian-users, 

Some files under /var and /usr are normally owned by root:systemgroup 
were the string systemgroup above can be root, staff, adm , mail, news ...etc

Q: Will the bootup break something if the ownership of /var/... are set to 
root:root instead? 

I am asking this because I want to be sure how to fix the following mistake. 
Logged as root I typed,  

# cd /home/lds ; chown -R lds:users * 

and to change the ownership of the (hidden) files beginning with a period under 
/home/lds I typed in the hurry and by mistake: 

# chown -R lds:users ~/.*

Ouch! two errors in one line :-( 
`~' is interpreted as /root and `*' expands to `.' among others like .. which 
the whole system tree. By the time I pressed CTRL-C, I had already changed the 
ownership of /root, /home, and some subdirs in /var and /usr to lds:users.
To fix this I first saved a list of the "damaged" files

# find $dir -exec ls -laR {} \; | grep "lds      users" >> \ 
> /floppy/fix_me.lst 

where $dir were set to /usr and /var. I fixed the ownership of /root and 
/home by hand and then halted the system with 

# shutdown -r now

so I could fix the ownership problem   from an "emergency" Debian 1.1. base 
system I have on a separate 16MB partition.

Specifically I am not quite  sure how to deal with the files in /var which are 
written at boot time ... ooops! and at shutdown too! :-( 
On the messed up system I have /, /var, /usr, /usr/local and /home (and swap) 
on separate partitions if that info is useful to you.

>From the listing I saved in the file fix_me.lst on the floppy, I know _which_ 
files have the wrong ownership. What I do not know is what was the original 
ownership, although for some of the files I can check the emergency 
minimal base system on the 16MB partition. 

My present idea to fix this problem is:
1) Set the ownership to root:root to all the files listed in /floppy/fix_me.lst 

2) Fix by hand those who should be owned by other system group (like adm,  mail,
news,...etc). Those files present in the base system should not pose any 
problem, as I can just check the clean emergency minimal base system. Or maybe I
am missing something? 

However it is not completely clear to me how to deal with some files which may 
have been created after installing non-base packages. 
Q: May they have had different from root:root ownership too?.

Another possibility would be to:
1') Remove (not purge) all the packages I installed on top of the base
    system. 
2') Fix ownership of included in base files by checking with the minimal base
    system.
3') Reinstall packages

Any suggestion to make it as safer/cleaner/greener/faster as possible will be 
greatly appreciated. Thank you very much for any idea/suggestion/pointer,

Lazaro 
<[email-masked]>