Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#23343 - Pacman does not set world readable permissions on db files (obeys umask instead)

Attached to Project: Pacman
Opened by Peter Lewis (petelewis) - Friday, 18 March 2011, 22:50 GMT
Last edited by Dan McGee (toofishes) - Sunday, 20 March 2011, 16:58 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.0
Due in Version 3.5.1
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Pacman 3.5.0 sets the db files according to the umask, which can make them not world readable and hence users might need root privileges to search the db. This is a change since <3.5, since then everything needed to search for packages was set world readable.

I.e.

% ls -l /var/lib/pacman/sync/core/pacman-3.4.3-1/desc
-rw-r--r-- 1 root root 370 Mar 17 19:53 /var/lib/pacman/sync/core/pacman-3.4.3-1/desc

% ls -l /var/lib/pacman/sync/core.db
-rw------- 1 root root 38K Mar 18 05:25 /var/lib/pacman/sync/core.db


Additional info:
* package version(s)
3.5.0


Steps to reproduce:

Set umask to 077 and do a pacman -Syu.
Now, as a normal user (not root) try to pacman -Ss <foo>

E.g.
% pacman -Ss kernel26
error: could not open file /var/lib/pacman/sync/testing.db: Failed to open '/var/lib/pacman/sync/testing.db'
error: could not open file /var/lib/pacman/sync/core.db: Failed to open '/var/lib/pacman/sync/core.db'
error: could not open file /var/lib/pacman/sync/extra.db: Failed to open '/var/lib/pacman/sync/extra.db'
error: could not open file /var/lib/pacman/sync/community-testing.db: Failed to open '/var/lib/pacman/sync/community-testing.db'
error: could not open file /var/lib/pacman/sync/community.db: Failed to open '/var/lib/pacman/sync/community.db'
error: could not open file /var/lib/pacman/sync/multilib.db: Failed to open '/var/lib/pacman/sync/multilib.db'

Thanks.
This task depends upon

Closed by  Dan McGee (toofishes)
Sunday, 20 March 2011, 16:58 GMT
Reason for closing:  Fixed
Additional comments about closing:  Commit f6716ae94a5f299569b35
Comment by Peter Lewis (petelewis) - Friday, 18 March 2011, 22:51 GMT
Sorry - forgot to set the version in the metadata - it's 3.5 as stated in the report itself.
Comment by Allan McRae (Allan) - Saturday, 19 March 2011, 01:20 GMT
Fix attached.

Loading...