[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setgid in /var/cache



Hamish Moffatt wrote:
> 
> On Sun, Feb 13, 2000 at 06:52:12AM -0600, Paul Serice wrote:
> > I have a package that needs files under /var/cache to be setgid.
> > The files are for Crafty to allow it to "learn" chess as it plays.
> > Part of the installation is that I install all that Crafty has
> > learned from all of its user's across the internet.  Then as
> > Crafty plays locally, it makes additions to these files under
> > /var/cache.
> >
> > I have built a Debian package that produces files with the right
> > ownerships and permissions if I use "--extract" on the package,
> > but after installation, the ownership is set root.root and
> > permissions are 644.
> >
> > Is dpkg preventing my scheme?
> 
> I can't see why dpkg would prevent it.  Can you make your sources
> and/or deb files available for download?

Upon further review, I think I know what's going on, but I'm not sure
what to do about it.

I have the files in /var/cache/crafty set up as configuration files.
If I do a "--purge" and then reinstall the crafty package, I get the
right file ownship and permissions.  I also get the right permissions
if a remove the configuration status of the files in /var/cache/crafty
and do an upgrade.

So, I guess I was just seeing an illusion.  I thought the files were
being replaced when they weren't because they were configuration
files.

I'm not sure what to do though.  The files in /var/cache/crafty really
should be configuration files, but I don't know how to fix the
ownership or permissions of those files when the user does an upgrade
except to add something to postinst.


Thanks
Paul Serice


Reply to: