[Bug] Files created in Winboat are owned by root
What version of WinBoat are you running?
0.8.7 from aur/winboat-bin
Your Environment
OS: EndeavourOS x86_64 DE: KDE Plasma 6.5.1 FreeRDP version: 3.17.2, 2.11.7
Steps to Reproduce / Context
- Share home folder using switch in WinBoat UI
- In windows, create any file in the shared folder
- In linux,
ls -lin the folder and check owner/group of the created file.
Logs
Expected Behavior
new files having owner/group of the user that run WinBoat (or as an alternative the user that the shared folder belongs to)
Current Behavior
new files have user/group of root:root .
Yes I can run chown recursively if need be, but it's still an annoyance.
Possible Solution
No response
Quality Notice
- [x] I have checked the issue tracker and verified that this bug is a unique case.
Edit: I think this is possible with --user/its docker compose equivalent
Edit x2: Nope, it doesn't seem like it, perhaps we'll have to wait for rootless podman support
We can also manually chroot the files, though I don't know how well that's work
I think this might have something to do with this function in /run/samba.sh file:
addShare() {
local dir="$1"
local ref="$2"
local name="$3"
local comment="$4"
mkdir -p "$dir" || return 1
ls -A "$dir" >/dev/null 2>&1 || return 1
if [ -z "$(ls -A "$dir")" ]; then
chmod 777 "$dir" || return 1
fi
if [[ "$dir" == "$tmp" ]]; then
{ echo "--------------------------------------------------------"
echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can exchange files with the host machine."
echo ""
echo "To select a folder on the host for this purpose, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"./example:${ref}\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"\${PWD:-.}/example:${ref}\""
echo ""
echo "Replace the example path ./example with your desired shared folder, which then will become visible here."
echo ""
} | unix2dos > "$dir/readme.txt"
fi
{ echo ""
echo "[$name]"
echo " path = $dir"
echo " comment = $comment"
echo " writable = yes"
echo " guest ok = yes"
echo " guest only = yes"
echo " force user = root"
echo " force group = root"
} >> "/etc/samba/smb.conf"
return 0
}
In particular, force user and force group parameters seem to be connected to the observed behavior. I wonder if we can change the assignment to root, or maybe, use inherit owner = unix only parameter instead ( https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#INHERITOWNER ). I can't check right now if this will work.
In the short term, I have been getting around this by making copys of the files. Fortunately, all the files I generally need from windows applications are under 20mb.
This has already been fixed in the latest version of the docker container, but WinBoat uses an older release.
I submitted a pull request to make WinBoat use the latest version: https://github.com/TibixDev/winboat/pull/473