mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-24 06:20:20 -05:00
14 lines
379 B
Bash
Executable File
14 lines
379 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Fix permissions of the home directory if the user doesn't own it
|
|
# Find out who owns /home/user
|
|
OWNER=$(stat -c '%U' /home/user 2>/dev/null || echo "user")
|
|
|
|
if [ "$OWNER" != "user" ]; then
|
|
# We use sudo because the container runs as 'user' but has passwordless sudo
|
|
sudo chown -R user:user /home/user 2>/dev/null || true
|
|
fi
|
|
|
|
exec open-terminal "$@"
|