[Samba] Mac OS & Folder Timestamps

David Corrigan piense at gmail.com
Sat Jun 29 18:38:43 UTC 2019


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.

Thanks,
David


More information about the samba mailing list