Article 5A6XN Wrong user/group of subdir and file created in /home/usernamedir/tmp

Wrong user/group of subdir and file created in /home/usernamedir/tmp

by
mackowiakp
from LinuxQuestions.org on (#5A6XN)
I have Debian Buster installed in LXC container on QNAP NAS. From container I run such script:

Code:debian@Debian:~/Pobrane$ cat ampli
#!/bin/bash

path_media="/share/homes/media/Pobrane/RADIO"
ssh_cmd="/usr/bin/ssh -p669 -x -q -i /home/debian/.ssh/id_debian admin@192.168.0.7"

[ ! -d /home/debian/tmp ] && mkdir /home/debian/tmp
$ssh_cmd $path_media/ampli $1 > /home/debian/tmp/ampliScript "ampli" returns text output to stdout. The content of output is ok.
But both "/home/debian/tmp" dir and "/home/debian/tmp/ampli" file have user/group - root/root. Should be debian/debian. Why is not? Any idea?latest?d=yIl2AUoC8zA latest?i=ONrqq16s9Ao:_KZ4RXal-S8:F7zBnMy latest?i=ONrqq16s9Ao:_KZ4RXal-S8:V_sGLiP latest?d=qj6IDK7rITs latest?i=ONrqq16s9Ao:_KZ4RXal-S8:gIN9vFwONrqq16s9Ao
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments