[Feature]: Support symlinked directories in `verifyPrivateDirectory`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Find verifyPrivateDirectory(_:) in the model serving and installation code; the issue shows that it currently uses lstat and rejects symbolic links. Read how the directory’s owner and type are validated, then check nearby tests for directory validation. Done means a user-owned symlink to a directory passes validation while unsafe targets remain rejected.
Written by the indexing model from the issue text.
Description
Area
Model downloads and installation
Problem or use case
When the TUFF serving/model directory is replaced with a symbolic link (for example, to store large models such as Gemma 4 26B-A4B on an external SSD), loading a model fails during the Validating model directory step with the following error:
Model load failed: The TUFF inference host could not be reached. TUFF serving directory is unsafe: TUFF
Suggested change
Supporting user-owned symlinks would allow users with limited internal storage to offload model directories to external volumes without breaking directory validation.
Alternatives or evidence
verifyPrivateDirectory(_:) currently relies on lstat, which inspects the symbolic link itself (S_IFLNK) rather than following it to the target directory (S_IFDIR):
fileprivate static func verifyPrivateDirectory(_ url: URL) throws {
var info = stat()
guard url.path.withCString({ lstat($0, &info) }) == 0,
(info.st_mode & S_IFMT) == S_IFDIR,
info.st_uid == getuid() else {
throw ServingHostProfileError.unsafeDirectory(url.lastPathComponent)
}
}
Would you like to work on this?
None
- Dominant language
- Swift
- Stars
- 52
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nikitabobko/AeroSpace#2427 · 1 comment ·
Maintainers usually reply within 8 days
-
spec
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
superhighfives/nylon-impossible#934 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Photivra/nope-camera#215 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openhab/openhab-ios#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
VictorKildahl/cra#1174 · 1 comment ·
Maintainers usually reply within 1 day