[Samba] Mac OS & Folder Timestamps

Ralph Boehme slow at samba.org
Sun Jun 30 09:31:33 UTC 2019


On 6/30/19 4:15 AM, Nico Kadel-Garcia via samba wrote:
> On Sat, Jun 29, 2019 at 2:40 PM David Corrigan via samba
> <samba at lists.samba.org> wrote:
>>
>> So this issue might not strictly a Samba problem, but it happens to be
>> where I found the issue and maybe there's a solution in the server or
>> someone who's familiar with the problem. Basically I'm using a Pi as a
>> small nas. I have a folder /media/ and a script that mounts usb drives
>> there automatically. So I shared /media/ with smb.conf. Windows & Linux had
>> no issue accessing the data, but Mac couldn't navigate into the folders
>> that had drives mounted on them. For example '/mnt/usb drive' wouldn't
>> work. I'd click the folder and it'd say "The folder can't be opened because
>> you don't have permission to view it's contents". Finally opened Wireshark
>> to see what the difference was between the folder with a drive mounted and
>> a normal folder that I made with mkdir. Apparently all the timestamp
>> information is set to 0 on the mount point folders and Mac OS just assumes
>> a 0 time means it doesn't have permission to browse the folder. I manually
>> set the time on the folder with touch -t and suddenly my Mac can browse
>> those folders. Not sure what the proper or permanent solution is, but it's
>> not an issue I would've guessed. Is the case of zeroed timestamps covered
>> as a special case in any Samba specs or code? Maybe I just have to have the
>> mount script touch the time on those folders, possibly after the drive has
>> been mounted. I haven't determined exactly why the timestamps on those
>> folders are 0 to begin with.
> 
> You have a Mac. As much as I appreciate Samba's power and
> sophistication, especially to replace Active Directory controllers
> with a powerful service today, do you have a compelling reason to use
> CIFS over NFS? NFS, as life turns out, may not be as performant. I
> acknowledge that CIFS has improved over time. But NFS mixed case
> filesystems correctly, which CIFS never will for legacy reasons. (You
> can't put two files in the same directory, one named "makefile" and
> the other named "Makefile".) And it can be notably less complex to
> administrate on the client for just such situations as this.
> 
> It may not be your long-term desired solution, but it may get you out
> of this particular rut.

possibly, but you end up with a bunch of other issues. NFS for Macs is
third class. If you can, use AFP (sic!), SMB second, NFS last. As AFP is
EOL, SMB bet it.

-slow

-- 
Ralph Boehme, Samba Team                https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46



More information about the samba mailing list