Post

Replies

Boosts

Views

Activity

Can't download files from file provider's folder if they are read-only
I face this issue only on macOS 26 and only on the Intel architecture. I'm unable to download files from a file provider's folder when I make them read-only. STEPS TO REPRODUCE Download the sample from https://developer.apple.com/documentation/fileprovider/synchronizing-files-using-file-provider-extensions?language=objc Follow the steps on the page to configure the project. Build the project. Run it. Add a domain. Open the domain's folder in the Finder. Move a file to the domain's folder. Right-click on the file in the domain's folder and select "Remove Download". Close the Finder's window with the domain's folder and kill all the "Provider" processes to get rid of running instances of the extension. Change Item's capabilities in Item.swift to make the items read-only: var result: NSFileProviderItemCapabilities = [ .allowsContentEnumerating, .allowsReading ] Rebuild the project and run it. Open the domain's folder and try to drag and drop the file from the extension's folder to, let's say, the Desktop folder. EXPECTED RESULT The file is copied ACTUAL RESULT A dialog pops up with text "The file “filename” cannot be downloaded. Do you want to skip it?" Stop/Skip
2
0
108
6d
SMB credentials check on Sonoma
I can't anymore check SMB credentials on macOS. Sonoma stops checking them after first successful validation. No matter which way to go, it could be smbutil, mount_smbfs, or even the NetFSMountURLSync function from the NetFS framework. Below is a script that works fine on Ventura, but would fail on Sonoma. There are three smbutil calls. The first call includes the correct username and password, the second omits the password, the third goes with an incorrect password. On Ventura and earlier the second and third calls fail, but Sonoma feels okay. The same could be seen with mount_smb. Is it a normal behavior? Is there a way to check credentials on Sonoma? #!/bin/bash # SMB server or its ip address SERVER="127.0.0.1" RESOURCE="Test" # username and password to authenticate on the server USER_NAME="username" USER_PASSWORD="password" # path to mount server resource MOUNT_POINT="/tmp/1" function Raise { echo "!!! ERROR: $1" exit 1 } /usr/bin/smbutil view -ANf "//${USER_NAME}:${USER_PASSWORD}@${SERVER}" || Raise "Unable to browse shares with credentials" /usr/bin/smbutil view -ANf "//${USER_NAME}:@${SERVER}" && Raise "Successfully browsed shares without password" /usr/bin/smbutil view -ANf "//${USER_NAME}:foobar@${SERVER}" && Raise "Successfully browsed shares with incorrect password" mkdir -p "/tmp/1" mount_smbfs -s "//${USER_NAME}:${USER_PASSWORD}@${SERVER}/${RESOURCE}" "/tmp/1" || Raise "Unable to mount share with credentials" diskutil unmount "/tmp/1" mkdir -p "/tmp/1" mount_smbfs -s "//${USER_NAME}:foobar@${SERVER}/${RESOURCE}" "/tmp/1" && Raise "Successfully mounted with incorrect password" diskutil unmount "/tmp/1"
4
3
2.1k
Feb ’24