feat: Alllow symlinks in shared folder (#243)

This commit is contained in:
Kroese 2025-01-08 15:58:19 +01:00 committed by GitHub
parent 4c6113e882
commit 4769201d0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,6 +71,9 @@ addShare() {
echo " guest account = nobody"
echo " map to guest = Bad User"
echo " server min protocol = NT1"
echo " follow symlinks = yes"
echo " wide links = yes"
echo " unix extensions = no"
echo ""
echo " # disable printing services"
echo " load printers = no"
@ -89,6 +92,13 @@ addShare "$share" "Data" "Shared" || error "Failed to create shared folder!"
[ -d "/data2" ] && addShare "/data2" "Data2" "Shared"
[ -d "/data3" ] && addShare "/data3" "Data3" "Shared"
IFS=',' read -r -a dirs <<< "${SHARES:-}"
for dir in "${dirs[@]}"; do
[ ! -d "$dir" ] && continue
dir_name=$(basename "$dir")
addShare "$dir" "$dir_name" "Shared $dir_name" || error "Failed to create shared folder for $dir!"
done
if ! smbd; then
error "Samba daemon failed to start!"
smbd -i --debug-stdout || true