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>
36 lines
1.4 KiB
Markdown
36 lines
1.4 KiB
Markdown
# Changelog
|
|
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
|
## [Unreleased]
|
|
|
|
### Fixed
|
|
|
|
- **Share-specific parameters not overriding global settings** ([#issue](https://github.com/upagge/samba/issues))
|
|
|
|
**Problem**: When creating public shares with guest write access, the `-G` parameters for individual shares did not override the global `force user` and `force group` settings from the base `smb.conf`.
|
|
|
|
Example that didn't work:
|
|
```bash
|
|
-s "public;/cloud/share;yes;no;yes"
|
|
-G "public;force user = nobody"
|
|
-G "public;force group = nogroup"
|
|
```
|
|
|
|
`testparm -s` showed that the share used global `force user = smbuser` and `force group = smb` instead of the specified values.
|
|
|
|
**Root cause**:
|
|
1. When using environment variables, `GENERIC` was processed **before** `SHARE`, so share sections didn't exist when `-G` options tried to modify them.
|
|
2. The regex `\s` in sed was not POSIX-compatible for Alpine/busybox.
|
|
|
|
**Solution**:
|
|
- Reordered environment variable processing: `SHARE` is now processed before `GENERIC`
|
|
- Replaced `\s` with POSIX-compatible `[[:space:]]` in regex patterns
|
|
- Added `^` anchor to sed append command for precise matching
|
|
|
|
### Changed
|
|
|
|
- Environment variable processing order: `GLOBAL` -> `SHARE` -> `GENERIC` (was: `GENERIC` -> `GLOBAL` -> `SHARE`)
|