Re: Mysterious write-only SMB behavior (Kirk)
Re: Mysterious write-only SMB behavior (Kirk)
- Subject: Re: Mysterious write-only SMB behavior (Kirk)
- From: Ken Thomases <email@hidden>
- Date: Tue, 2 May 2017 20:40:02 -0500
You should have the Windows network admin examine the files for their attributes, ACLs, and other metadata. Compare with files which show up properly to see if you can identify the problematic ones.
Regards,
Ken
On May 1, 2017, at 11:11 AM, Kirk Kerekes <email@hidden> wrote:
>
> More details.
>
> The write-only procedure was using -[NSString writeToURL:atomically:encoding:error:], with atomically set to YES.
>
> I noticed that the app did file-move and rename operations on, to and between SMB volumes without problems, so I changed the write process to create the file locally on the Mac and use NSFileManager to [ moveItemAtURL:toURL:error:] the item to the remote SMB volume. This works flawlessly.
>
> But this does not identify the actual source of the problem. -[NSString writeToURL:atomically:encoding:error:] should work correctly. (Or perhaps I need to wrap it in some additional housekeeping?)
> However I cannot easily assert that this is a Foundation problem even though the code has worked correctly for years on older Windows Server shares.
>
> I am not any kind of expert on Windows networking, and have no insight as to why creating a file on a Windows share should be different than copying a file to the same share.
>
> I would still welcome any wisdom on this, at least to provide a reference for befuddled future readers.
>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 28 Apr 2017 15:21:45 -0500
>> From: Kirk <email@hidden>
>> To: email@hidden
>> Subject: Mysterious write-only SMB behavior
>> Message-ID: <email@hidden>
>> Content-Type: text/plain; charset=us-ascii
>>
>> I have Cocoa application that does a specialized task for my employer. It runs on a Mini running Sierra but all file I/O is from/to network SMB volumes shared by Windows Server over the company network.
>>
>> The Mini is a full admin domain member, both computer and user.
>>
>> This application has been working fine, until we recently upgraded the server from WS 2008 to 2016 and moved a lot of stuff around.
>>
>> Now, files that my app creates over SMB are invisible to Macs, but visible to Windows clients. And then if that were not odd enough, the files become visible to a Mac if they are found by a Finder file-name search on the SMB volume. Once the search is closed, the files resume being invisible.
>>
>> All of the files are text files, with various non-standard file extensions for housekeeping purposes.
>>
>> FIles that my app merely modifies (renames) and relocates remain visible, and directories that it creates are visible.
>>
>> If this rings a bell with anyone, I would appreciate a clue, which would be one more than I have now.
>>
>> Kirk Kerekes
>> (iPhone)
>>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden