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

Bug#1032594: apt: hard-coded directory permissions 0755



Package: apt
Version: 2.2.4
Severity: normal

https://salsa.debian.org/apt-team/apt/-/blob/main/apt-pkg/contrib/fileutl.cc#L398
>  if (mkdir(progress.c_str(), 0755) != 0)

it would be good to make this configurabel with something similar to
`FileMode`.

We are using `apt-ftpachive` in a shared ennvironment. We are using
`umask 0002` to give group-membery rwx-access by default.
Our top-level directory has mode 02775 and group "build", so that every
path created below it is again owned by that group and has the SGID-bit
set.

But directories and files created by `apt-ftparchive` lack
write-permission for the group:
- Permissions for files can be configured via `FileMode`, which defaults
  to 0644.
- But there is nothing for directories, which is hard-coded to 0755.


-- Package-specific info:

-- /etc/apt/preferences --

Package: *
Pin: release a=testing
Pin-Priority: 50

-- (no /etc/apt/preferences.d/* present) --
-- (/etc/apt/sources.list present, but not submitted) --
-- (/etc/apt/sources.list.d/pbuilder.list present, but not submitted) --


-- System Information:
Debian Release: 11.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable'), (50, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-21-amd64 (SMP w/4 CPU threads)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de:en_US
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt depends on:
ii  adduser                 3.118
ii  debian-archive-keyring  2021.1.1
ii  gpgv                    2.2.27-2+deb11u2
ii  libapt-pkg6.0           2.2.4
ii  libc6                   2.31-13+deb11u5
ii  libgcc-s1               10.2.1-6
ii  libgnutls30             3.7.1-5+deb11u3
ii  libseccomp2             2.5.1-1+deb11u1
ii  libstdc++6              10.2.1-6
ii  libsystemd0             247.3-7+deb11u1

Versions of packages apt recommends:
ii  ca-certificates  20210119

Versions of packages apt suggests:
pn  apt-doc         <none>
ii  aptitude        0.8.13-3
ii  dpkg-dev        1.20.12
ii  gnupg           2.2.27-2+deb11u2
ii  gnupg1          1.4.23-1.1
ii  gnupg2          2.2.27-2+deb11u2
ii  powermgmt-base  1.36

-- no debconf information


Reply to: