qemu-discuss
[Top][All Lists]
Advanced

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

Re: mode of pidfile


From: Ottavio Caruso
Subject: Re: mode of pidfile
Date: Wed, 01 Jul 2020 18:28:06 +0200
User-agent: Roundcube Webmail/1.3.2

On 2020-07-01 18:00, Ottavio Caruso wrote:
On Wed, 1 Jul 2020 at 16:59, Ottavio Caruso
<ottavio2006-usenet2012@yahoo.com> wrote:

On Wed, 1 Jul 2020 at 16:45, Kai Peter <kp@lists.openqmail.org> wrote:
>
> Hi,
>
> I'm curious why the option -pidfile creates a file with mode 0600.

It doesn't :

Sorry, I meant it does, but not owned by root:


oc@e130:~$ cat opt/bin/boot-openbsd-virtio
#!/bin/sh
qemu-system-x86_64 \
-drive if=virtio,file=/home/oc/VM/img/openbsd.image,index=0,media=disk \
-M q35,accel=kvm -m 250M -cpu host,kvmclock-stable-bit -smp $(nproc) \
-nic user,hostfwd=tcp:127.0.0.1:5556-:22,model=virtio-net-pci \
-daemonize -display none  \
-serial mon:telnet:127.0.0.1:6666,server,nowait \
-pidfile /home/oc/VM/pid/openbsd-pid


oc@e130:~$ ls -l /home/oc/VM/pid/
total 4
-rw------- 1 oc oc 5 Jul  1 16:54 openbsd-pid

Exactly, it will be created with mode 0600 (-rw-------). Maybe I wasn't clear enough: I want to know why? And Whay not 0644 (-rw-r--r--). Qemu sets the owner of the user who invokes it - that's fine. Starting qemu as root creates the file owned root:root. Than "-runas <ordinary user>" drops privileges and the <ordinary user> couldn't read the file. Maybe there is a reason for?

regards
Kai

--
Ottavio Caruso

--
-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠-⁠
Dyn@mic IP'ing: http://dyndn.es
!!! DynDN.eS is NOT dyn.com !!!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]