Skip to content

Bug: self-hosted Debian 13 apt & permission issue #1027

@BrandonDR

Description

@BrandonDR

Describe the bug

After failing to install the first time (see verbose logs below)

I get this permission issue when the next job tries to "Set up job"

Current runner version: '2.329.0'
Runner name: '(redacted)-runner-1'
Runner group name: 'Default'
Machine name: '(redacted)-runner-1'
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Error: One or more errors occurred. (Access to the path '/home/user/actions-runner/_work/_actions/shivammathur/setup-php/2.35.5/src/configs/ini/conf.d/99-pecl.ini' is denied.)

Version

  • v2
  • v1

Runners

Self Hosted

Operating systems

Debian 13.2 "trixie"
Latest version as of now.

PHP versions

php 8.4

To Reproduce

Get a Debian 13 VPS and follow github's steps to setup the self hosted runner on your repo

Example GHA workflow

name: Test Suite

on:
  pull_request:
    types: [opened, reopened, ready_for_review, synchronize]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  php-tests:
    if: github.event.pull_request.draft == false
    runs-on: self-hosted

    strategy:
      fail-fast: true
      matrix:
        php: [8.4]

    name: PHP ${{ matrix.php }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Setup PHP
        uses: shivammathur/setup-php@verbose
        with:
          php-version: ${{ matrix.php }}
          extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
          coverage: none

Expected behavior

Seems to be an error with the debian 13 "trixie" apt repository for php, and it results in a permission issue for any following jobs.

I expect it to install php8.4 and not leave the runner in a bad state.

Screenshots/Logs

; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; output_buffering
; Default Value: Off
; Development Value: 4096
; Production Value: 4096
; register_argc_argv
; Default Value: On
; Development Value: Off
; Production Value: Off
; request_order
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
; session.gc_divisor
; Default Value: 100
; Development Value: 1000
; Production Value: 1000
; short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off
; variables_order
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS"
; zend.assertions
; Default Value: 1
; Development Value: 1
; Production Value: -1
; zend.exception_ignore_args
; Default Value: Off
; Development Value: Off
; Production Value: On
; zend.exception_string_param_max_len
; Default Value: 15
; Development Value: 15
; Production Value: 0
;;;;;;;;;;;;;;;;;;;;
; php.ini Options ;
;;;;;;;;;;;;;;;;;;;;
; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
;user_ini.filename = ".user.ini"
; To disable this feature set this option to an empty value
;user_ini.filename =
; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
;user_ini.cache_ttl = 300
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
;extension=pdo_mysql
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See https://www.php.net/manual/en/snmp.installation.php
;extension=snmp
;extension=soap
;extension=sockets
;extension=sodium
;extension=sqlite3
;extension=tidy
;extension=xsl
;extension=zip
;zend_extension=opcache
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[CLI Server]
; Whether the CLI web server uses ANSI color coding in its terminal output.
cli_server.color = On
[Date]
; Defines the default timezone used by the date functions
; https://php.net/date.timezone
;date.timezone =
; https://php.net/date.default-latitude
;date.default_latitude = 31.7667
; https://php.net/date.default-longitude
;date.default_longitude = 35.2333
; https://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.833333
; https://php.net/date.sunset-zenith
;date.sunset_zenith = 90.833333
[filter]
; https://php.net/filter.default
;filter.default = unsafe_raw
; https://php.net/filter.default-flags
;filter.default_flags =
[iconv]
; Use of this INI entry is deprecated, use global input_encoding instead.
; If empty, default_charset or input_encoding or iconv.input_encoding is used.
; The precedence is: default_charset < input_encoding < iconv.input_encoding
;iconv.input_encoding =
; Use of this INI entry is deprecated, use global internal_encoding instead.
; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
;iconv.internal_encoding =
; Use of this INI entry is deprecated, use global output_encoding instead.
; If empty, default_charset or output_encoding or iconv.output_encoding is used.
; The precedence is: default_charset < output_encoding < iconv.output_encoding
; To use an output encoding conversion, iconv's output handler must be set
; otherwise output encoding conversion cannot be performed.
;iconv.output_encoding =
[intl]
;intl.default_locale =
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
;intl.use_exceptions = 0
[sqlite3]
; Directory pointing to SQLite3 extensions
; https://php.net/sqlite3.extension-dir
;sqlite3.extension_dir =
; SQLite defensive mode flag (only available from SQLite 3.26+)
; When the defensive flag is enabled, language features that allow ordinary
; SQL to deliberately corrupt the database file are disabled. This forbids
; writing directly to the schema, shadow tables (eg. FTS data tables), or
; the sqlite_dbpage virtual table.
; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html
; (for older SQLite versions, this flag has no use)
;sqlite3.defensive = 1
[Pcre]
; PCRE library backtracking limit.
; https://php.net/pcre.backtrack-limit
;pcre.backtrack_limit=100000
; PCRE library recursion limit.
; Please note that if you set this value to a high number you may consume all
; the available process stack and eventually crash PHP (due to reaching the
; stack size limit imposed by the Operating System).
; https://php.net/pcre.recursion-limit
;pcre.recursion_limit=100000
; Enables or disables JIT compilation of patterns. This requires the PCRE
; library to be compiled with JIT support.
;pcre.jit=1
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; https://php.net/pdo-odbc.connection-pooling
;pdo_odbc.connection_pooling=strict
[Pdo_mysql]
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
pdo_mysql.default_socket=
[Phar]
; https://php.net/phar.readonly
;phar.readonly = On
; https://php.net/phar.require-hash
;phar.require_hash = On
;phar.cache_list =
[mail function]
; For Win32 only.
; https://php.net/smtp
SMTP = localhost
; https://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; https://php.net/sendmail-from
;sendmail_from = [email protected]
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; https://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off
; Use mixed LF and CRLF line separators to keep compatibility with some
; RFC 2822 non conformant MTA.
mail.mixed_lf_and_crlf = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
[ODBC]
; https://php.net/odbc.default-db
;odbc.default_db = Not yet implemented
; https://php.net/odbc.default-user
;odbc.default_user = Not yet implemented
; https://php.net/odbc.default-pw
;odbc.default_pw = Not yet implemented
; Controls the ODBC cursor model.
; Default: SQL_CURSOR_STATIC (default).
;odbc.default_cursortype
; Allow or prevent persistent links.
; https://php.net/odbc.allow-persistent
odbc.allow_persistent = On
; Check that a connection is still valid before reuse.
; https://php.net/odbc.check-persistent
odbc.check_persistent = On
; Maximum number of persistent links. -1 means no limit.
; https://php.net/odbc.max-persistent
odbc.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
; https://php.net/odbc.max-links
odbc.max_links = -1
; Handling of LONG fields. Returns number of bytes to variables. 0 means
; passthru.
; https://php.net/odbc.defaultlrl
odbc.defaultlrl = 4096
; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
; of odbc.defaultlrl and odbc.defaultbinmode
; https://php.net/odbc.defaultbinmode
odbc.defaultbinmode = 1
[MySQLi]
; Maximum number of persistent links. -1 means no limit.
; https://php.net/mysqli.max-persistent
mysqli.max_persistent = -1
; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
; https://php.net/mysqli.allow_local_infile
;mysqli.allow_local_infile = On
; It allows the user to specify a folder where files that can be sent via LOAD DATA
; LOCAL can exist. It is ignored if mysqli.allow_local_infile is enabled.
;mysqli.local_infile_directory =
; Allow or prevent persistent links.
; https://php.net/mysqli.allow-persistent
mysqli.allow_persistent = On
; Maximum number of links. -1 means no limit.
; https://php.net/mysqli.max-links
mysqli.max_links = -1
; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
; https://php.net/mysqli.default-port
mysqli.default_port = 3306
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; https://php.net/mysqli.default-socket
mysqli.default_socket =
; Default host for mysqli_connect() (doesn't apply in safe mode).
; https://php.net/mysqli.default-host
mysqli.default_host =
; Default user for mysqli_connect() (doesn't apply in safe mode).
; https://php.net/mysqli.default-user
mysqli.default_user =
; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a bad idea to store passwords in this file.
; Any user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
; https://php.net/mysqli.default-pw
mysqli.default_pw =
; If this option is enabled, closing a persistent connection will rollback
; any pending transactions of this connection, before it is put back
; into the persistent connection pool.
;mysqli.rollback_on_cached_plink = Off
[mysqlnd]
; Enable / Disable collection of general statistics by mysqlnd which can be
; used to tune and monitor MySQL operations.
mysqlnd.collect_statistics = On
; Enable / Disable collection of memory usage statistics by mysqlnd which can be
; used to tune and monitor MySQL operations.
mysqlnd.collect_memory_statistics = Off
; Records communication from all extensions using mysqlnd to the specified log
; file.
; https://php.net/mysqlnd.debug
;mysqlnd.debug =
; Defines which queries will be logged.
;mysqlnd.log_mask = 0
; Default size of the mysqlnd memory pool, which is used by result sets.
;mysqlnd.mempool_default_size = 16000
; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
;mysqlnd.net_cmd_buffer_size = 2048
; Size of a pre-allocated buffer used for reading data sent by the server in
; bytes.
;mysqlnd.net_read_buffer_size = 32768
; Timeout for network requests in seconds.
;mysqlnd.net_read_timeout = 31536000
; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
; key.
;mysqlnd.sha256_server_public_key =
Hit:1 https://packages.sury.org/php trixie InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
php8.4-common
The following NEW packages will be installed:
php8.4-common php8.4-xml
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1307 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Get:1 https://packages.sury.org/php trixie/main amd64 php8.4-common amd64 8.4.15-1+020251120.38+debian131.gbp1e3f4c [765 kB]
Get:2 https://packages.sury.org/php trixie/main amd64 php8.4-xml amd64 8.4.15-1+020251120.38+debian131.gbp1e3f4c [542 kB]
Fetched 1307 kB in 0s (6958 kB/s)
Selecting previously unselected package php8.4-common.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 51586 files and directories currently installed.)
Preparing to unpack .../php8.4-common_8.4.15-1+020251120.38+debian131.gbp1e3f4c_amd64.deb ...
Unpacking php8.4-common (8.4.15-1+020251120.38+debian131.gbp1e3f4c) ...
Selecting previously unselected package php8.4-xml.
Preparing to unpack .../php8.4-xml_8.4.15-1+020251120.38+debian131.gbp1e3f4c_amd64.deb ...
Unpacking php8.4-xml (8.4.15-1+020251120.38+debian131.gbp1e3f4c) ...
Setting up php8.4-common (8.4.15-1+020251120.38+debian131.gbp1e3f4c) ...
Replacing config file /etc/php/8.4/mods-available/calendar.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/ctype.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/exif.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/fileinfo.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/ffi.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/ftp.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/gettext.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/iconv.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/pdo.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/phar.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/posix.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/shmop.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/sockets.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/sysvmsg.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/sysvsem.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/sysvshm.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/tokenizer.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Setting up php8.4-xml (8.4.15-1+020251120.38+debian131.gbp1e3f4c) ...
Replacing config file /etc/php/8.4/mods-available/dom.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/simplexml.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/xml.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/xmlreader.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/xmlwriter.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
Replacing config file /etc/php/8.4/mods-available/xsl.ini with new version
since you asked for it.
The new and the old files are identical, AFAICS
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/ondrej-debian-php-trixie.list:1 and /etc/apt/sources.list.d/ondrej-debian-php-trixie.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/ondrej-debian-php-trixie.list:1 and /etc/apt/sources.list.d/ondrej-debian-php-trixie.sources:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/ondrej-debian-php-trixie.list:1 and /etc/apt/sources.list.d/ondrej-debian-php-trixie.sources:1
/home/tender/actions-runner/_work/_actions/shivammathur/setup-php/verbose/src/scripts/../scripts/extensions/add_extensions.sh: line 16: php: command not found
/home/tender/actions-runner/_work/_actions/shivammathur/setup-php/verbose/src/scripts/../scripts/extensions/add_extensions.sh: line 5: semver: parameter null or not set
Error: The process '/usr/bin/bash' failed with exit code 1

Additional context

No response

Are you willing to submit a PR?

No

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions