Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
1
answers
3119
views
How is Inotifyd different from inotifywait in term of monitoring a directory and do some post actions?
I need to monitor a directory and do some post actions based on the events happened. I am familiar with `inotifywait` but since we use docker based on alpine, I was thinking about is there other way to do that. Then I found [`Inotifyd`][1], according to the document there said "While there are tools...
I need to monitor a directory and do some post actions based on the events happened. I am familiar with
inotifywait
but since we use docker based on alpine, I was thinking about is there other way to do that.
Then I found Inotifyd
, according to the document there said "While there are tools designed around inotify (inotify-tools) alpine has a build in tool called inotifyd (part of busybox) to execute a command on file system events."
But the problem are, a) according that alpine document setting inotifyd
to work seems quite complicated compared to inotifywait
b) I can't find many articles about inotifyd. So I get the feeling that it is not widely-used.
So can someone with experience of Inotifyd shed some light on this ?
Qiulang 邱朗
(261 rep)
Jul 1, 2021, 04:17 AM
• Last activity: Jul 26, 2025, 03:07 PM
2
votes
1
answers
14724
views
How to SSH on alphine linux with iSH on ipad?
Iam trying out linux on Ipad through the iSH app, however, i cant seem to find my username it always returns 'root' when i do whoami. So now iam confused how I can ssh into another computer or even how to ssh into my ipad, as Ive tried multiple commands to find my ip on the ipad however it just does...
Iam trying out linux on Ipad through the iSH app, however, i cant seem to find my username it always returns 'root' when i do whoami. So now iam confused how I can ssh into another computer or even how to ssh into my ipad, as Ive tried multiple commands to find my ip on the ipad however it just doesnt work.
e.g I try ifconfig -a but its shows /proc/net/dev: No such file or directory.
curl ifconfig.me works for the public ip, but i need the host ip for ssh which doesnt show me.
Another example :
Mathewss-iPad:~# hostname -I
hostname: unrecognized option: I
BusyBox v1.31.1 () multi-call binary.
Usage: hostname [OPTIONS] [HOSTNAME | -F FILE]
Get or set hostname or DNS domain name
-s Short
-i Addresses for the hostname
-d DNS domain name
-f Fully qualified domain name
-F FILE Use FILE's content as hostname
issues:
Can't SSH into our out to any devices because:
1. Cant find hostname just 'root'
2. Cant retrieve host ip address
3. But everything works as normal in linux apk installing packages, making folders, changing directories etc.
Mj _
(21 rep)
Sep 14, 2021, 09:30 AM
• Last activity: Jul 23, 2025, 02:03 AM
0
votes
0
answers
40
views
Can't use distrobox due to permission error. Podman behaves weirdly
# Prerequisites Alpine Linux Edge ``` ~ $ podman --version podman version 5.5.2 ~ $ distrobox --version distrobox: 1.8.1.2 ~ $ mount|grep ^cgroup|awk '{print $1}'|uniq cgroup2 ``` I followed the steps in Alpine Wiki for setting up distrobox and podman for rootless usage. # What is happening The bloc...
# Prerequisites
Alpine Linux Edge
~ $ podman --version
podman version 5.5.2
~ $ distrobox --version
distrobox: 1.8.1.2
~ $ mount|grep ^cgroup|awk '{print $1}'|uniq
cgroup2
I followed the steps in Alpine Wiki for setting up distrobox and podman for rootless usage.
# What is happening
The block bellow is the primary issue I'm running into.
~ $ distrobox create --name debox --image debian:latest
Creating 'debox' using image debian:latest [ OK ]
Distrobox 'debox' successfully created.
To enter, run:
distrobox enter debox
~ $ distrobox enter debox
Error: unable to start container "409500222cb9ecfb488522e1d0a13046e68408fcb62a9dcfb52ae88bda0816c0": runc: runc create failed: unable to start container process: unable to apply cgroup configuration: rootless needs no limits + no cgrouppath when no permission is granted for cgroups: mkdir /sys/fs/cgroup/409500222cb9ecfb488522e1d0a13046e68408fcb62a9dcfb52ae88bda0816c0: permission denied: OCI permission denied
I've attempted to create the folder distrobox tries to create and give my user complete permissions to use it to no avail. The same error occurs. Launching this container with just podman will output the same error.
Meanwhile, starting similar container with podman seamingly works.
~ $ distrobox rm debox
# output omitted
~ $ podman create --name debox -i debian:latest
62f2044c8bb7e86b4a78bd48e7f0c66c1071924a3bc65c0d49519ca399753d9c
~ $ podman start debox
debox
As indicated by podman stats
the container is up and running:
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU %
62f2044c8bb7 debox 23.49% 0B / 7.182GB 0.00% 0B / 796B 2.876GB / 1.516GB 0 1h22m26.154492s 6227.30%
It starts with showing impossibly high CPU percentage hence, the high average CPU use. Probably, irrelevant to issue.
After attaching to container there is no prompt. Detaching to exit via ctrl+p, ctrl+q is impossible. Attempting to stop container will force podman to resort to SIGKILL. Container will not appear in podman ps
afterwords (it did before) but, still can be launched but, the same as above will repeat:
~ $ podman stop debox
WARN StopSignal SIGTERM failed to stop container debox in 10 seconds, resorting to SIGKILL
debox
~ $ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
~ $ podman start debox
debox
# What I want
Just distrobox enter debox
and use container as intended.
mcv_dev
(101 rep)
Jul 18, 2025, 06:05 PM
2
votes
2
answers
1442
views
IPTables not logging packets in Alpine
I have an `Alpine 3.13.5 VM` freshly installed and `iptables v1.8.6 (legacy)` is working properly. However when I try to log the packets with this command, it's not generating any: ``` iptables -A INPUT -j LOG ``` I have tried changing log levels and creating custom `/etc/syslog.conf`: ``` user.* /v...
I have an
Alpine 3.13.5 VM
freshly installed and iptables v1.8.6 (legacy)
is working properly.
However when I try to log the packets with this command, it's not generating any:
iptables -A INPUT -j LOG
I have tried changing log levels and creating custom /etc/syslog.conf
:
user.* /var/log/user.log
kern.* /var/log/kern.log
user
logs are redirected to the proper file but there's still no kern.log
.
Same thing is working out of box on other distros such as Debian.
d9ngle
(357 rep)
May 5, 2021, 01:36 PM
• Last activity: Jul 5, 2025, 09:23 PM
0
votes
3
answers
206
views
Alpine linux (LXC) not running cron jobs
I have been trying for a long to make the crontab entries to run, but it doesn't matter what Time / schedule I enter, it doesn't seem to work. I have confirmed my current time zone with `date` command & `/etc/localtime` for the symbolic link. How do I know that cron is not working? My script calls $...
I have been trying for a long to make the crontab entries to run, but it doesn't matter what Time / schedule I enter, it doesn't seem to work. I have confirmed my current time zone with
Here I am providing the script, as there is a suspicion regarding this
---
This is under **root** cron so privileges are not an issue.
#!/bin/sh
# Log file for updates
LOG_FILE="/var/log/alpine_weekly_update.log"
echo "--- $(date) ---" >> "$LOG_FILE"
echo "Starting Alpine Linux weekly update..." >> "$LOG_FILE"
apk update >> "$LOG_FILE" 2>&1
apk upgrade >> "$LOG_FILE" 2>&1
# &1 is to differentiate from a file name(str or int) but as a desctiptor, here it will redirect both the stderr,and stdout to the logfile
# Check for kernel updates:
if [ -f /var/run/reboot-required ]; then
echo "Reboot required after update. Rebooting Now" >> "$LOG_FILE"
reboot
fi
echo "Alpine Linux weekly update finished." >> "$LOG_FILE"
echo "-----------------" >> "$LOG_FILE"
----------------------------------------------------
Update:
After a whole day of troubleshooting with this deployment, I did not managed to figure out the fault, except that I had installed **Cornie** in that which is causing a conflict.
Synopsis:
- syslog-ng was running and logging (installed, not a default).
- crond was confirmed running (by rc-service crond status).
- crontab entry was valid and present for root.
- Ownership (chown), Mode (chmod) and UID, GID all are in favour of root in the Script, log and cron (cornie-service / crond)
- crond was NOT sending any CRON messages to syslog-ng, even after explicit restarts
- Installed and reinstalled Cornie, Deleted the .Pid files (/run/cronie.pid ; /var/run/cronie.pid)
----------------------------------------------------------
I spun off another alpine (3.21, previous was the same) and became very surprised by this --
Here I didn't install Cornie, but **no entry** on the crontab which had a **specific time** mentioned, did work. For example if I wanted to run each day 12:30AM (30 12 * * * /path/to/script).
However, when I put the schedule of running every minute (* * * * * /path/to/script) it ran properly. And I want to mention, that no declaration of path (PATH=) or Time zone / TZ (which was my primary suspicion) was provided, yet the each minute implementation was working. Furthermore I didnt even re-load the rc-services.
At this point I dont think there is any point going further, as most probably the busybox itself has some flaws or the cron has some other deep issues.
date
command & /etc/localtime
for the symbolic link.
How do I know that cron is not working?
My script calls $date (date and time or running) in it to print within the output log, but when I modify the crontab entry to a specific time, it doesn't reflect that time, only the time of last manual execution.
Furthermore, I know that the script does run as I have run it manually and verified the output log, so it's not due to triggering a script error. Yes, rc-service crond restart
has also been applied.
Someone, please suggest any avenue to investigate or troubleshoot further.
Here is my crontab entry, please ignore the 'weekly' naming.
Redacted timezone entries are Continent/Timezone

Neail
(79 rep)
Jun 21, 2025, 03:25 PM
• Last activity: Jun 28, 2025, 07:17 AM
0
votes
2
answers
2590
views
reading fstab to mount sshfs in container
I'm using Docker to create an image from `openjdk:8-jdk-alpine` and trying to mount a remote folder using sshfs + fuse. in order to do that I run the container with `docker run -d --rm --device /dev/fuse --privileged my_container` the code in the Dockerfile I put the following lines: RUN echo "sshfs...
I'm using Docker to create an image from
openjdk:8-jdk-alpine
and trying to mount a remote folder using sshfs + fuse. in order to do that I run the container with docker run -d --rm --device /dev/fuse --privileged my_container
the code in the Dockerfile I put the following lines:
RUN echo "sshfs#myuser@${host}:${folder} $mount_folder fuse allow_other,default_permissions,umask=0007,idmap=file,uidfile=/etc/sshfs_umap,gidfile=/etc/sshfs_gmap,nomap=ignore,StrictHostKeyChecking=no,IdentityFile=/root/.ssh/id_rsa 0 0" >> /etc/fstab
this line basically add to /etc/fstab the command to mount remote folder using sshfs.
when I access the container, I can't see the files in my mount_folder
, but when i manually run
$mount -a
the folder is successfully mounted.
how can I make this automatically mounted when container starts?
toto
(113 rep)
Apr 28, 2020, 07:56 PM
• Last activity: Jun 27, 2025, 07:08 PM
0
votes
1
answers
4355
views
Realtek WiFi adapters not recognized in custom Alpine Linux install
I am running Alpine Linux from a custom ISO that I created using the extended profile as a base (following instructions https://unix.stackexchange.com/questions/370895/install-packages-into-a-custom-alpine-linux-iso and https://wiki.alpinelinux.org/wiki/How_to_make_a_custom_ISO_image_with_mkimage)....
I am running Alpine Linux from a custom ISO that I created using the extended profile as a base (following instructions https://unix.stackexchange.com/questions/370895/install-packages-into-a-custom-alpine-linux-iso and https://wiki.alpinelinux.org/wiki/How_to_make_a_custom_ISO_image_with_mkimage) .
Everything works perfectly, except it does not detect any wifi adapter (internal or USB). Running
lshw
seems to indicate both are Realtek.
Just to be sure, I also did add the non-free b43 drivers as described here: https://wiki.alpinelinux.org/wiki/Connecting_to_a_wireless_access_point
I have the same problem when running from RAM as I do when running on the sys
install to hard disk.
What am I missing here that I can't get the wifi working?
Jeff
(11 rep)
Mar 7, 2019, 05:44 AM
• Last activity: Jun 17, 2025, 06:06 PM
4
votes
1
answers
4175
views
Troubleshooting Gitea openrc script in Alpine: Forking and logging issues
I am trying to write an init script for `gitea` in alpine. The first code I tried was #!/sbin/openrc-run command=/usr/bin/gitea command_args="web" pidfile=/var/run/git.pid name="Gitea Daemon" description="Gitea - Git with a cup of tea" start() { ebegin "Starting Gitea" start-stop-daemon --start --ex...
I am trying to write an init script for
gitea
in alpine. The first code I tried was
#!/sbin/openrc-run
command=/usr/bin/gitea
command_args="web"
pidfile=/var/run/git.pid
name="Gitea Daemon"
description="Gitea - Git with a cup of tea"
start() {
ebegin "Starting Gitea"
start-stop-daemon --start --exec /usr/bin/gitea \
--pidfile /var/run/git.pid
eend $?
}
stop() {
ebegin "Stopping Gitea"
start-stop-daemon --stop --exec /usr/bin/gitea \
--pidfile /var/run/git.pid
eend $?
}
Gitea does not fork, so when running above code, the service is starting and running but stays in foreground. So I tried to add --background
option to start-stop-daemon
. Now it is forking but the service is shown as „crashed“ although it’s running. I can fix this by manually creating a git.pid
file, otherwise the service is unusable (won’t start nor stop) until I remove /var/run/openrc/started/git
manually.
When using the code above and calling it in background by
rc-service git start &
It will start gitea but rc-status
shows the service as „starting“.
Additionally I did not accomplish to log the output. Maybe somebody can give me a hint on this. I tried to add a redirect to command_args
but this did not work and a redirect of start-stop-daemon’s output is useless when run in background.
karlsebal
(835 rep)
Oct 19, 2018, 12:55 PM
• Last activity: May 27, 2025, 09:03 AM
0
votes
0
answers
67
views
Linux: Podman container Alpine + Wayland + xRDP multiuser + any window compositor
Does there is any possibility to have this combination? Podman container with: - Alpine Linux - Wayland - xRDP with multiuser support - any window compositor I have found there are some limitation of multiuser support in Gnome-remote-desktop. Should I use xRDP with xwayland as only way? Does there h...
Does there is any possibility to have this combination?
Podman container with:
- Alpine Linux
- Wayland
- xRDP with multiuser support
- any window compositor
I have found there are some limitation of multiuser support in Gnome-remote-desktop.
Should I use xRDP with xwayland as only way?
Does there has been anyone successful with Wayland over RDP (ideally without X interconnection)?
Thanks for advice.
VitezslavSimon
(121 rep)
May 23, 2025, 08:13 PM
0
votes
0
answers
40
views
Can not run script with jenkins user
My host is on alpine Linux and I'm running a jenkins agent on docker. I need the jenkins agent to be able to run a script when it does a build that changes the ownership of a few directories. Every time I run the script as the jenkins user from the container I get "Operation not permitted". I'm able...
My host is on alpine Linux and I'm running a jenkins agent on docker. I need the jenkins agent to be able to run a script when it does a build that changes the ownership of a few directories. Every time I run the script as the jenkins user from the container I get "Operation not permitted". I'm able to run the script fine from the host and fine as root on the container. my dodas config (on host) is:
permit persist :wheel
permit nopass Local_Admin cmd /srv/scripts/setperm.sh
permit nopass :wheel cmd /srv/scripts/setperm.sh
I get this when I do id for my host account:
uid=1000(Local_Admin) gid=1000(Local_Admin) groups=0(root),10(wheel),18(audio),27(video),28(netdev),1000(Local_Admin),1000(Local_Admin)
on the container as the jenkins user i get
uid=1000(jenkins) gid=1000(jenkins) groups=10(wheel),1000(jenkins)
Any ideas?
***EDIT***
I don't know if it matters but here is the script and permissions
#!/bin/sh
chgrp -R jenkins /home/jenkins/docker-volumes
chmod g+rwx -R /home/jenkins/docker-volumes
echo "$USER"
id
and permissions
dockingbay2:~$ cd /srv/scripts
dockingbay2:/srv/scripts$ ls -l
total 4
-rwsr-xr-x 1 root root 199 May 14 08:29 setperm.sh
dockingbay2:/srv/scripts$
andcbii
(1 rep)
May 14, 2025, 01:50 PM
• Last activity: May 14, 2025, 03:10 PM
2
votes
1
answers
2557
views
Crosscompile go(lang) app with docker for alpine linux (musl) aarch64 with native libs so CGO enabled
## Background I'm writing an open-source GTK go app subsonic API client which: - targets on first place mobile friendly Linux like [postmarketOS][1] (alpine linux), [Mobian][2] (debian) - in future will be also extended to desktop Linux, Windows and Mac OS but not Android or iOS as they already have...
## Background
I'm writing an open-source GTK go app subsonic API client which:
- targets on first place mobile friendly Linux like postmarketOS (alpine linux), Mobian (debian)
- in future will be also extended to desktop Linux, Windows and Mac OS but not Android or iOS as they already have one.
- needs to be available at least on
aarch64
and x86_64
- depends on native libs like portaudio
, libasound
, libopus
- so it needs CGO
to be enabled
I haven't published app yet as I self-host my git and I have to do some additional config. It won't be available until late october 2021.
App successfully compiles (on host) and runs on my main PC which is x86_64 fedora.
App successfully compiles (on docker) and runs on aarch64 **glibc** distros like Mobian
This is Dockerfile:
`
FROM golang:1.17-bullseye
LABEL os=linux
LABEL arch=arm64
ENV GOOS=linux
ENV GOARCH=arm64
ENV CGO_ENABLED=1
ENV CC=aarch64-linux-gnu-gcc
ENV PATH="/go/bin/${GOOS}_${GOARCH}:${PATH}"
ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
# install build & runtime dependencies
RUN dpkg --add-architecture arm64
RUN apt update && apt upgrade -y
RUN apt install -y --no-install-recommends \
protobuf-compiler \
upx \
gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross \
pkg-config \
libasound2-dev:arm64 \
libgtk-3-dev:arm64 \
libcairo2-dev:arm64 \
libglib2.0-dev:arm64 \
libgdk-pixbuf2.0-dev:arm64 \
libsamplerate0:arm64 \
libsamplerate0-dev:arm64 \
libopusfile0:arm64 \
libopusfile-dev:arm64 \
libopus0:arm64 \
libopus-dev:arm64 \
libportaudio2:arm64 \
portaudio19-dev:arm64
# install build dependencies (code generators)
RUN go get github.com/hajimehoshi/oto \
&& go get github.com/faiface/beep \
&& go get github.com/faiface/beep/flac \
&& go get github.com/faiface/beep/speaker \
&& go get github.com/faiface/beep/mp3 \
&& go get github.com/faiface/beep/vorbis \
&& go get github.com/faiface/beep/wav\
&& go get github.com/gotk3/gotk3 \
&& go get github.com/delucks/go-subsonic \
&& go get github.com/hashicorp/go-retryablehttp \
&& go get github.com/zalando/go-keyring \
&& go get github.com/emirpasic/gods/lists/ \
&& go get github.com/emirpasic/gods/lists/arraylist \
`
## Problems
1. I can't run Mobian working binary on postmarketOS as alpine linux uses musl instead. file
output is: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, (...) for GNU/Linux 3.7.0. not stripped
.
2. I haven't manged to use musl toolchain in docker debian as it is 32 binary executable and image is 64 bit.
3. I couldn't find anything about multiarch in alpine so probably I can't use docker image goalng:1.17-alpine on x86_64 (I'd have also to find native libs packaged)
I wish it's just problem with my config, if it's possible I'd love solution with docker as I'd like to use CI/CD in future.
## Resources, ideas, workarounds
- I have raspberry pi with debian installed with some services. I could use with native musl toolchain and debian aarch64 docker container but it's not handy in production pipeline. Also, I haven't tried this.
## Good to read
1. Crosscompile CGO projects (also with docker)
2. Crosscompile with cross-platform musl toolchains
3. Related stackoverflow thread about alpine linux and go binaries
BigB
(21 rep)
Aug 27, 2021, 09:27 PM
• Last activity: May 10, 2025, 10:03 PM
1
votes
1
answers
45
views
disconnect packages managed by alpine apk but keep them on the system
I've installed nextcloud on proxmox in an alpine container using ttecks (rip!) helper script. After some tweaks, I am now able to update nextcloud from the application itself. Now I have the following issue: Nextcloud is still managed by alpines apk, so when I run `apk upgrade`, the nextcloud packag...
I've installed nextcloud on proxmox in an alpine container using ttecks (rip!) helper script. After some tweaks, I am now able to update nextcloud from the application itself.
Now I have the following issue: Nextcloud is still managed by alpines apk, so when I run
apk upgrade
, the nextcloud package will be updated too, what will break my nextcloud instance.
Is there a way to remove (the nextcloud) packages from the management by apk? Like removal of the apk database? I tried to remove it from the /etc/apk/world
file. The result is nextcloud beeing removed by apk :/
lutz108
(11 rep)
Nov 26, 2024, 12:31 AM
• Last activity: May 7, 2025, 03:53 PM
2
votes
1
answers
312
views
apk update -- WARNING: opening /repo: No such file or directory for existing repo
I'm trying to collect apk packages to local repo to install them later. But `apk update` says that this repo directory does not exists (what is not true). It does not depend on actual location and is very strange Run alpine: ``` docker run -it --rm alpine:latest sh ``` Create repo inside and try to...
I'm trying to collect apk packages to local repo to install them later. But
apk update
says that this repo directory does not exists (what is not true). It does not depend on actual location and is very strange
Run alpine:
docker run -it --rm alpine:latest sh
Create repo inside and try to use it:
/ # mkdir /repo
/ # apk fetch --recursive -o /repo screen
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.21/main : No such file or directory
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.21/community : No such file or directory
screen: unable to select package (or its dependencies)
/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz
v3.21.3-357-g39d49089a10 [https://dl-cdn.alpinelinux.org/alpine/v3.21/main]
v3.21.3-358-g5686bc96b73 [https://dl-cdn.alpinelinux.org/alpine/v3.21/community]
OK: 25396 distinct packages available
/ # apk fetch --recursive -o /repo screen
Downloading libncursesw-6.5_p20241006-r3
Downloading linux-pam-1.6.1-r1
Downloading musl-1.2.5-r9
Downloading ncurses-terminfo-base-6.5_p20241006-r3
Downloading screen-5.0.0-r0
Downloading skalibs-libs-2.14.3.0-r0
Downloading utmps-libs-0.1.2.3-r2
/ # cd repo
/repo # ls -lah
total 1M
drwxr-xr-x 2 root root 4.0K Apr 21 17:54 .
drwxr-xr-x 1 root root 63 Apr 21 17:53 ..
-rw-r--r-- 1 root root 154.9K Nov 11 17:11 libncursesw-6.5_p20241006-r3.apk
-rw-r--r-- 1 root root 191.0K Oct 30 12:34 linux-pam-1.6.1-r1.apk
-rw-r--r-- 1 root root 401.7K Feb 13 17:58 musl-1.2.5-r9.apk
-rw-r--r-- 1 root root 20.8K Nov 11 17:11 ncurses-terminfo-base-6.5_p20241006-r3.apk
-rw-r--r-- 1 root root 431.5K Oct 30 12:35 screen-5.0.0-r0.apk
-rw-r--r-- 1 root root 76.2K Oct 30 12:35 skalibs-libs-2.14.3.0-r0.apk
-rw-r--r-- 1 root root 4.9K Oct 30 12:35 utmps-libs-0.1.2.3-r2.apk
/repo # apk index -vU -o APKINDEX.tar.gz *.apk
Index has 0 packages (of which 7 are new)
/repo # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz
v3.21.3-357-g39d49089a10 [https://dl-cdn.alpinelinux.org/alpine/v3.21/main]
v3.21.3-358-g5686bc96b73 [https://dl-cdn.alpinelinux.org/alpine/v3.21/community]
OK: 25396 distinct packages available
/repo # echo "/repo" >> /etc/apk/repositories
/repo # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz
WARNING: opening /repo: No such file or directory
v3.21.3-357-g39d49089a10 [https://dl-cdn.alpinelinux.org/alpine/v3.21/main]
v3.21.3-358-g5686bc96b73 [https://dl-cdn.alpinelinux.org/alpine/v3.21/community]
OK: 25396 distinct packages available
Demetry Pascal
(121 rep)
Apr 21, 2025, 06:01 PM
• Last activity: May 7, 2025, 12:36 PM
1
votes
1
answers
1192
views
No Authentication Agent Found Although Already Running
I have an Alpine-Linux based system (PostmarketOS) running with the LXQT DE. Ever since I set up the system, out of the box it came with a bunch of problems with user authentication. I have various problems, including: - Whenever I plug in a USB thumb drive, I get a message saying "Error: not author...
I have an Alpine-Linux based system (PostmarketOS) running with the LXQT DE.
Ever since I set up the system, out of the box it came with a bunch of problems with user authentication. I have various problems, including:
- Whenever I plug in a USB thumb drive, I get a message saying "Error: not authorized to perform operation."
- If I try to run any downloaded program such as Gparted which requires authentication, I don't get a popup message prompting for my password, and instead get the message "Error executing command as another user: No authentication agent found."
- If I try to edit the user settings with any built-in tools such as the LXQT Configuration Center, I get the same error.
After investigating this for a while, I noticed that it seems like the authentication agent is already running. It's set to autostart and I can see it running in the system monitor:
If I try to run
Therefore, I have reason to believe that the required programs are on my system since I see them running and I'm able to run them manually with the command line.
However, I am unable to figure out why the sudo GUI frontend never pops up automatically when an application is requesting superuser permissions, and why I can't perform basic actions such as using my USB thumb drive or change system settings.
I set the root user password and logged in to the root user account, and don't face any of these issues there. So there is something wrong with the setup for the authentication agent or polkit in general and I'm not sure what to do. Help would be greatly appreciated. Thank you for your time.


pkttyagent -p $(echo $$) | lxqt-sudo gparted
then I get the popup to finally appear: 
Hexyl Cinnamal
(21 rep)
Jun 6, 2022, 03:56 PM
• Last activity: Apr 12, 2025, 01:16 PM
2
votes
0
answers
45
views
Custom PAM module and Oauth2 tokens
I have rootless Podman container (system: Alpine Linux) in Podman (master system: Alpine Linux). Container is able to work with xRDP (and sesman) so I am able to connect to it via local user (if defined). I would like to authorize user even if no account already defined on container system. I would...
I have rootless Podman container (system: Alpine Linux) in Podman (master system: Alpine Linux). Container is able to work with xRDP (and sesman) so I am able to connect to it via local user (if defined). I would like to authorize user even if no account already defined on container system. I would like to write custom PAM module with checking external service data via OAuth2 or REST API requests. Unfortunately I am not able to get password user typed in xRDP login form.
My current questions:
- I have a plan to prepare sh script for this operation. Does it is possible in general?
- I would like to keep xRDP login form so I don't have an access to web browser at time of login so external service cannot be activated before login form. I believe I can work with REST API of service also (but need token or user name - password pair).
- Do I have any chance to get password from xrdp login dialog or really not due to PAM architecture?
- Does PAM module is the only way here in Linux how to authorize+authenticate users for Alpine Linux (or in general for any Linux)?
Thanks for help.
VitezslavSimon
(121 rep)
Apr 11, 2025, 09:23 AM
0
votes
1
answers
58
views
Add only a part of an Alpine package
A coworker recently shelled into an Alpine-based container and ran `apk add` with some special additional syntax such that only a part of a package was installed. More specifically, he wanted only the command-line client of the `redis` package (which includes both client and server). I've scoured th...
A coworker recently shelled into an Alpine-based container and ran
apk add
with some special additional syntax such that only a part of a package was installed.
More specifically, he wanted only the command-line client of the redis
package (which includes both client and server).
I've scoured the web, and read through all of the relevant [man
pages](https://man.archlinux.org/listing/extra/apk-tools/) , but I can't seem to find the invocation that he used.
chb
(699 rep)
Mar 28, 2025, 08:24 PM
• Last activity: Apr 2, 2025, 03:59 PM
0
votes
0
answers
39
views
WiFi not working Alpine Linux on DC ROMA Laptop II
I have [installed Alpine Linux on my DC ROMA Laptop II](https://unix.stackexchange.com/questions/786071/installing-alpine-on-dc-roma-laptop-ii-risc-v-how-can-i-make-an-image-from-a) successfully and managed since then to get the password to work too. I am piggybacking off of the kernel (and boot stu...
I have [installed Alpine Linux on my DC ROMA Laptop II](https://unix.stackexchange.com/questions/786071/installing-alpine-on-dc-roma-laptop-ii-risc-v-how-can-i-make-an-image-from-a) successfully and managed since then to get the password to work too. I am piggybacking off of the kernel (and boot stuff) provided by Deepcomputing which is (from my understanding) a modified version of kernel version
6.1.15
.
I currently have no internet connection (there is no Ethernet port) so I am trying to install WiFi on my computer. I have been installing packages by downloading the apks from [here](https://dl-cdn.alpinelinux.org/alpine/v3.21/main/) and [here](https://dl-cdn.alpinelinux.org/alpine/v3.21/community/) on my main computer, dragging them into the root folder on the MicroSD I am loading Alpine Linux from and then running on my DC ROMA Laptop II:
apk add --allow-untrusted
I have installed all of the linux-firmware-*
, linux-firmware
, and wpa_supplicant
modules this way. I have also been trying to follow [this guide for Wifi](https://wiki.alpinelinux.org/wiki/Wi-Fi) but ip link
only returns lo
and sit0
. I know that I have a wireless adapter because lspci
gives:
Network controller: Realtek Semiconductor Co., Ltd. RTL8852BE PCIe 802.11ax Wireless Network Controller
However, the drivers do not appear to be working as lshw -C network
gives:
*-network UNCLAIMED
description: Network controller
product: Realtek Semiconductor Co., Ltd.
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0001:01:00.0
version: 00
width: 64 bits
clock: 33Mhz
capabilities: pm msi pciexpress cap_list
configuration: latency=0
resources: ioport:1000(size=256) memory:90200000-902fffff
Interestingly, the Debian image that came with computer shows a different result for lshw -C network
, namely:
*-network
description: Ethernet Interface
product: RTL8852BE PCIe 802.11ax Wireless Network Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0001:01:00.0
logical name: wlP1p1s0
version: 00
serial: 44:87:63:e4:b0:0f
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical
configuration: broadcast=yes driver=rtl8852be driverversion=1.19.11-175-g5130b5e2d.2024042 firmware=N/A latency=0 link=yes multicast=yes
resources: irq:101 ioport:1000(size=256) memory:90200000-902fffff
From my understanding it should be linux-firmware-rtw89
(which is installed) that provides drivers for the WiFi.
Running dmesg | grep firmware
does not appear to give anything out of the ordinary:
riscv-pmu-sbi: 16 firmware and 18 hardware counters
Any guidance on how to continue would be appreciated.
Dair
(143 rep)
Mar 11, 2025, 08:21 PM
2
votes
0
answers
95
views
Why is BusyBox find 10x slower than GNU find?
on a directory containing ~26 million files, GNU Find is 10 times faster than BusyBox find, why? ``` /var/www # time find /var/www -regex .*\.\(php\|js\|json\|html\|htm\|css\) -not -regex \(.*/docroot/external_libs/.*\|.*/docroot/phpmyadmin/.*\|.*/vendor/.*\|.*/data/vitec/.*\|.*/docroot/js/highchart...
on a directory containing ~26 million files, GNU Find is 10 times faster than BusyBox find, why?
/var/www # time find /var/www -regex .*\.\(php\|js\|json\|html\|htm\|css\) -not -regex \(.*/docroot/external_libs/.*\|.*/docroot/phpmyadmin/.*\|.*/vendor/.*\|.*/data/vitec/.*\|.*/docroot/js/highcharts/.*\|.*/hotpatch_backups/.*\) -print0 > /dev/null
real 1m 20.09s
user 1m 6.94s
sys 0m 13.14s
/var/www # time busybox find /var/www -regex .*\.\(php\|js\|json\|html\|htm\|css\) -not -regex \(.*/docroot/external_libs/.*\|.*/docroot/phpmyadmin/.*\|.*/vendor/.*\|.*/data/vitec/.*\|.*/docroot/js/highcharts/.*\|.*/hotpatch_backups/.*\) -print0 > /dev/
null
real 13m 4.99s
user 1m 31.49s
sys 3m 16.60s
(Actually in production, we thought we saw busybox find being almost 30 times slower, 2 minutes to 60 minutes, but we're unable to reproduce it)
Porting a system from Debian-linux (which defualts to GNU find) to Alpine-linux (which defaults to BusyBox find), and had a problem where a find command was hanging on Alpine but not on Debian.
hanshenrik
(695 rep)
Mar 11, 2025, 02:19 PM
17
votes
1
answers
1615
views
crontab schedule on Alpine Linux runs on days it's not supposed to run on
I have a schedule in my personal crontab on an Alpine Linux 3.20 system that runs at 00:10 from Tuesdays to Sundays (i.e., all days of the week except Mondays): ```text 10 0 * * 2-7 "$HOME/local/sbin/backup.sh" prune-daily ``` This appears to trigger on Mondays too. Why? --- Note that my initial rep...
I have a schedule in my personal crontab on an Alpine Linux 3.20 system that runs at 00:10 from Tuesdays to Sundays (i.e., all days of the week except Mondays):
10 0 * * 2-7 "$HOME/local/sbin/backup.sh" prune-daily
This appears to trigger on Mondays too. Why?
---
Note that my initial report gave the symptoms as "Does not run on Sundays". I misremembered what happened, sorry. I have corrected the description of the symptoms after investigating them more thoroughly. The crontab schedule is correct, as it was from the start.
Kusalananda
(354171 rep)
Sep 15, 2024, 01:01 PM
• Last activity: Mar 1, 2025, 11:10 AM
2
votes
1
answers
140
views
TPM2 in qemu running aarch64 alpine linux
I want to run an Alpine Linux VM and want to connect the host's TPM to the VM. The host is x86_64 based. The command for qemu is ``` qemu-system-aarch64 \ -m 1024 -cpu cortex-a57 -M virt \ -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \ -drive file=disk.qcow2,if=virtio,format=qcow2 \ -cdrom alpine-3...
I want to run an Alpine Linux VM and want to connect the host's TPM to the VM. The host is x86_64 based. The command for qemu is
qemu-system-aarch64 \
-m 1024 -cpu cortex-a57 -M virt \
-bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
-drive file=disk.qcow2,if=virtio,format=qcow2 \
-cdrom alpine-3.21.3-aarch64.iso \
-nographic \
-device virtio-net-device,netdev=n0 \
-netdev user,id=n0 \
-tpmdev type=passthrough,id=tpm0,path=/dev/tpmrm0,cancel-path=/dev/tpmrm0 \
-device tpm-tis-device,tpmdev=tpm0
As for the installation disk alpine-3.21.3-aarch64.iso
, I have tried both the "standard" and the "virt" version from here . They both boot fine and also the installation works, but from neither I can access the host's tpm. On the host, the TPM works fine, as I can test for example using tpm2_getrandom 8 --hex
and from the fact that /dev/tpm0
and /dev/tpmrm0
exist.
On the VM, those two devices do not exist and I cannot get it to work. Here some debugging output from the VM:
$ dmesg | grep -i tpm
[ 0.000000] efi: SMBIOS 3.0=0x7fed0000 TPMFinalLog=0x7c3e0000 MEMATTR=0x7e227018 ACPI 2.0=0x7c3d0018 TPMEventLog=0x7c3d9098 INITRD=0x7c3c9b18 MEMRESERVE=0x7c3c9b98
[ 0.000000] ACPI: TPM2 0x000000007C3DE898 00004C (v04 BOCHS BXPC 00000001 BXPC 00000001)
I had already added the kernel module tpm_tis_spi
to /etc/modules
. This is why I see:
$ lsmod | grep -i tpm
tpm_tis_spi 20480 0
tpm_tis_core 28672 1 tpm_tis_spi
tpm 102400 2 tpm_tis_core,tpm_tis_spi
rng_core 20480 1 tpm
There seem to be some drivers available:
$ find /lib/modules/$(uname -r) -name '*tpm*'
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm/tpm.ko.gz
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm/tpm_tis_spi.ko.gz
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm/tpm_tis_core.ko.gz
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm/tpm_atmel.ko.gz
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm/xen-tpmfront.ko.gz
/lib/modules/6.12.16-0-lts/kernel/drivers/char/tpm/tpm_infineon.ko.gz
/sys/class/tpm/
and /sys/class/tpmrm/
exist, but are empty.
On the host, from tpm2_getcap properties-fixed
I figured out that the TPM is an Infineon SLB9670. On the VM, this only gives an error message (as currently expected):
$ tpm2_getcap properties-fixed
ERROR:tcti:src/tss2-tcti/tcti-device.c:455:Tss2_Tcti_Device_Init() Failed to open specified TCTI device file /dev/tpmrm0: No such file or directory
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:149:tcti_from_file() Could not initialize TCTI file: device
ERROR:tcti:src/tss2-tcti/tctildr.c:477:tctildr_init_context_data() Failed to instantiate TCTI
ERROR: Could not load tcti, got: "(null)"
What am I missing?
HerpDerpington
(195 rep)
Feb 21, 2025, 07:26 PM
• Last activity: Feb 26, 2025, 04:19 PM
Showing page 1 of 20 total questions