debtags update called from packagesearch results in /var/lib/debtags/* files to have restricitve permissions

Enrico Zini enrico at enricozini.org
Mon Oct 9 22:20:05 UTC 2006


On Mon, Oct 09, 2006 at 11:56:54PM +0200, Benjamin Mesing wrote:

> when updateing the debtags index via packagesearch (which simply
> executes "debtags update" inside a terminal emulator) the files in
> the /var/lib/debtags directory end up with permissions to restrictive:
>         -rw-r----- 1 root root 1237083 2006-10-09 23:48 apt.tag
>         -rw-r----- 1 root root   67198 2006-10-09 23:48 apt.voc
>         -rw-r----- 1 root root  871432 2006-10-09 23:48 package-tags
>         -rw-r----- 1 root root  532896 2006-10-09 23:48 package-tags.idx
>         -rw-r----- 1 root root  464944 2006-10-09 23:48 pkgidx.idx
>         -rw-r----- 1 root root   67287 2006-10-09 23:48 vocabulary
>         -rw-r----- 1 root root   22160 2006-10-09 23:48 vocabulary.idx
> It seems not to help, when I wait for some time after having executed
> "debtags update" before doing anything else.
> A normal "debtags update" executed from the command line does not show
> this effect and even fixes all permissions except for pkgidx.idx.
> I have no idea where this might come from. Any help would be
> appreciated.

Wow.  What the...  What is the umask you have in pkgsearch?  It should
just follow the umask...

This is the code I use:

	// Read the current umask
	mode_t mask = umask(0);
	umask(mask);
	// Set the file permissions
	if (fchmod(fd, 0666 & ~mask) == -1)
		throw wibble::exception::System("setting permissions on file " + tmpname);

And still, I'd only use that code on the .idx files, not on the other
files.  It sounds to me that the umask at rebuilding time has something
wrong.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/debtags-devel/attachments/20061010/a749de36/attachment.pgp


More information about the Debtags-devel mailing list