I am developing a new OS-X App. When I try to save a file using an internally-generated file name based on the most-recently read file, I get Error 513. Saving to a file whose name comes from NSSavePanel works fine. What privilege is the App missing?
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “2022-09-03.xml” in the folder “2022”." UserInfo={NSFilePath=/Volumes/HDD2/Documents/OS-X Apps/Polls/2022/2022-09-03.xml, NSUnderlyingError=0x600002765740 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}