Where to configure target dir of `qvm-move`/`qvm-copy` (`/home/user/QubesIncomming`)?

3 views
Skip to first unread message

Johannes Graumann

unread,
Apr 5, 2022, 9:56:33 AM4/5/22
to qubes...@googlegroups.com
See subject line - I'd like to remap the `/home/user` bit to `/tmp` to
enforce cleanup ...

Thanks for any pointers.

Joh

awokd

unread,
Apr 7, 2022, 5:21:13 PM4/7/22
to qubes...@googlegroups.com
'Johannes Graumann' via qubes-users:
> See subject line - I'd like to remap the `/home/user` bit to `/tmp` to
> enforce cleanup ...

Not user configurable as far as I know. Think you'd have to identify the
VM component responsible for receiving a qvm-moved/copied file, then
edit the source?

--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

airele...@tutanota.com

unread,
Apr 10, 2022, 5:48:32 AM4/10/22
to Qubes Users
In /rw/config/rc.local, you can create /tmp/QubesIncoming. Then replace ~/QubesIncoming with a symlink to /tmp/QubesIncoming

Johannes Graumann

unread,
Apr 12, 2022, 9:10:39 AM4/12/22
to airele...@tutanota.com, Qubes Users
Good strategy, I'll try that. Thank you.

Johannes Graumann

unread,
Apr 13, 2022, 9:16:28 AM4/13/22
to airele...@tutanota.com, Qubes Users
This *.sls works nicely:

```
configure `rc.local` to remove any present `QubesIncoming`:
file.replace:
- name: /rw/config/rc.local
- pattern: '^rm -rf /home/user/QubesIncoming$'
- repl: 'rm -rf /home/user/QubesIncoming'
- append_if_not_found: True

configure `rc.local` to create `/tmp/QubesIncoming`:
file.replace:
- name: /rw/config/rc.local
- pattern: '^install -d -o user -g user -m 770 /tmp/QubesIncoming$'
- repl: 'install -d -o user -g user -m 770 /tmp/QubesIncoming'
- append_if_not_found: True

configure `rc.local` to link `/tmp/QubesIncoming` to $HOME:
file.replace:
- name: /rw/config/rc.local
- pattern: '^ln -s /tmp/QubesIncoming /home/user/QubesIncoming$'
- repl: 'ln -s /tmp/QubesIncoming /home/user/QubesIncoming'
- append_if_not_found: True

configure `rc.local` to properly chown the link:
file.replace:
- name: /rw/config/rc.local
- pattern: '^chown -h user:user /home/user/QubesIncoming$'
- repl: 'chown -h user:user /home/user/QubesIncoming'
- append_if_not_found: True
```

It generates this code block in `/rw/config/rc.local`:

```
rm -rf /home/user/QubesIncoming
install -d -o user -g user -m 770 /tmp/QubesIncoming
ln -s /tmp/QubesIncoming /home/user/QubesIncoming
chown -h user:user /home/user/QubesIncoming
```

Reply all
Reply to author
Forward
0 new messages