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
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.
On 29/06/2019 19:38, David Corrigan via samba 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. > > Thanks, > Davidknown problem: https://bugzilla.samba.org/show_bug.cgi?id=13999 Rowland
On 6/30/19 9:21 AM, Rowland penny via samba wrote:> known problem: https://bugzilla.samba.org/show_bug.cgi?id=13999fwiw, that sounds completely unrelated. -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46
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
On Sat, Jun 29, 2019 at 10:15:03PM -0400, Nico Kadel-Garcia via samba wrote:> > 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 toWell, that's not true for the planned SMB3+ UNIX extensions, which will allow this to work. There's a test tree on samba.org that implenents this and Steve French's SMB3 kernel client is implementing the client-side of things. Steve (Samba Team member) works for Microsoft now, so whilst this isn't an official Microsoft endorsement of these changes, it is certainly a positive step for Linux. We're being much more careful than we were with the gung-ho SMB1 UNIX extensions, paying much more attention to correctness and security, but it's a glimpse of where we're planning to get to.
Apparently Analagous Threads
- Mac OS & Folder Timestamps
- Mac OS & Folder Timestamps
- Increase data length for SMB2 write and read requests for Windows 10 clients
- Increase data length for SMB2 write and read requests for Windows 10 clients
- Increase data length for SMB2 write and read requests for Windows 10 clients