Re: Mysterious write-only SMB behavior (Kirk)
Re: Mysterious write-only SMB behavior (Kirk)
- Subject: Re: Mysterious write-only SMB behavior (Kirk)
- From: Matthew Kozak <email@hidden>
- Date: Wed, 3 May 2017 10:39:36 +0000
- Thread-topic: Mysterious write-only SMB behavior (Kirk)
Microsoft updates the default negotiated version of SMB used in each release and in your situation it's a major bump from 2.x (Server 2008) to 3.x (as of Server 2012). See section 4, here, for a matrix of versions:
https://blogs.technet.microsoft.com/josebda/2015/05/05/whats-new-in-smb-3-1-1-in-the-windows-server-2016-technical-preview-2/
That may be an angle worth investigating?
Matt
________________________________
From: Cocoa-dev <cocoa-dev-bounces+mkozak=email@hidden> on behalf of Ken Thomases <email@hidden>
Sent: Tuesday, May 2, 2017 9:40 PM
To: email@hidden
Cc: cocoadev cocoadev
Subject: Re: Mysterious write-only SMB behavior (Kirk)
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:
> https://na01.safelinks.protection.outlook.com/?url=https://lists.apple.com/mailman/options/cocoa-dev/ken%40codeweavers.com&data=02|01|email@hidden|ca09dd9b5a5345ff88e408d491c5581f|b92d2b234d35447093ff69aca6632ffe|1|0|636293724156810942&sdata=+8BfY7sEzdEI9qZI3Ss9uvpItZNEbGh7MUHyjox7Cao=&reserved=0
>
> 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:
https://na01.safelinks.protection.outlook.com/?url=https://lists.apple.com/mailman/options/cocoa-dev/mkozak%40camden.rutgers.edu&data=02|01|email@hidden|ca09dd9b5a5345ff88e408d491c5581f|b92d2b234d35447093ff69aca6632ffe|1|0|636293724156810942&sdata=/fnjn8RjX+RvJOs6SckyepLAqTBLEdS+lxqrKzmcd98=&reserved=0
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