After apt-get install some commands are not available

I am stuck!
I build a docker container with this

FROM --platform=linux/amd64 ubuntu:20.04
RUN apt update
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y install ftp openssh-client sshpass rsync

when I run and go into the container rsync and sshpass are not available. They show up as installed in the apt list output.
other commands like ssh or sftp do work.

I am not sure if this is a debian problem.

Any ideas how to fix this?

nobody@931a64e08919:/var/www$ rsync
bash: rsync: command not found
nobody@931a64e08919:/var/www$ ssh
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]
nobody@931a64e08919:/var/www$ sftp
usage: sftp [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
          [-D sftp_server_path] [-F ssh_config] [-i identity_file]
          [-J destination] [-l limit] [-o ssh_option] [-P port]
          [-R num_requests] [-S program] [-s subsystem | sftp_server]

How do you start the container? It looks like you start it as “nogroup”. If you also changed the environment variable “PATH” in which the paths of the parent folders of the commands should be, you won’t be able to execute the commands without using an absolue path. The interesting thing is that ssh and rsync are in the same folder: /usr/bin/ so if one works, the other should too.

Since the Dockerfile itself doesn’t have anything that would indicate changing the user in the container, something must have happened when you started the container.