Problem: When using environment variables, GENERIC was processed before SHARE, so share sections didn't exist when -G options tried to modify them. Also, \s regex was not POSIX-compatible for Alpine/busybox. Changes: - Reorder env var processing: GLOBAL -> SHARE -> GENERIC - Replace \s with [[:space:]] in regex patterns - Add ^ anchor to sed append command - Add CHANGELOG.md documenting the fix - Update README.md (sync with Russian version) - Update README_RU.md with troubleshooting section 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[Unreleased]
Fixed
-
Share-specific parameters not overriding global settings (#issue)
Problem: When creating public shares with guest write access, the
-Gparameters for individual shares did not override the globalforce userandforce groupsettings from the basesmb.conf.Example that didn't work:
-s "public;/cloud/share;yes;no;yes" -G "public;force user = nobody" -G "public;force group = nogroup"testparm -sshowed that the share used globalforce user = smbuserandforce group = smbinstead of the specified values.Root cause:
- When using environment variables,
GENERICwas processed beforeSHARE, so share sections didn't exist when-Goptions tried to modify them. - The regex
\sin sed was not POSIX-compatible for Alpine/busybox.
Solution:
- Reordered environment variable processing:
SHAREis now processed beforeGENERIC - Replaced
\swith POSIX-compatible[[:space:]]in regex patterns - Added
^anchor to sed append command for precise matching
- When using environment variables,
Changed
- Environment variable processing order:
GLOBAL->SHARE->GENERIC(was:GENERIC->GLOBAL->SHARE)