Hi Niranjan,

default access permission is 0600 on /run/podman/io.podman directory, so you can't use non-root user
to access this listening directory, but you may modify permission before starting io.podman.socket,
good luck!

[root@ajia-rhel-8 ajia]# ls -lad /run/podman/io.podman
srw-------. 1 root root 0 Aug  9 01:42 /run/podman/io.podman

[root@ajia-rhel-8 ajia]# cat /usr/lib/systemd/system/io.podman.socket
[Unit]
Description=Podman Remote API Socket
Documentation=man:podman-varlink(1)

[Socket]
ListenStream=/run/podman/io.podman
SocketMode=0600


[Install]
WantedBy=sockets.target

Sincerely,
Alex Jia


On Fri, Aug 9, 2019 at 1:16 PM <niranjan@ashoo.in> wrote:
Greetings,

I have a container running on RHEL8 , The container was started as non root user using podman cli. I am trying to connect to container using varlink and it's unable to connect.

$ podman ps
CONTAINER ID  IMAGE                            COMMAND         CREATED       STATUS           PORTS  NAMES
de27f6bd7c59  docker.io/library/fedora:latest  /usr/sbin/init  22 hours ago  Up 22 hours ago         mysssd


$ sudo systemctl restart io.podman.socket
$ sudo systemctl status io.podman.socket
● io.podman.socket - Podman Remote API Socket
   Loaded: loaded (/usr/lib/systemd/system/io.podman.socket; enabled; vendor preset: disabled)
   Active: active (listening) since Fri 2019-08-09 10:38:38 IST; 1s ago
     Docs: man:podman-varlink(1)
   Listen: /run/podman/io.podman (Stream)
   CGroup: /system.slice/io.podman.socket


$varlink call -m unix:/run/podman/io.podman/io.podman.ListContainerProcesses '{"name": "mysssd", "opts": []}'
Unable to connect: CannotConnect


Version:
podman-1.0.0-2.git921f98f.module+el8+2785+ff8a053f.x86_64
libvarlink-16-1.el8.x86_64
libvarlink-util-16-1.el8.x86_64

Regards
Niranjan
_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io