Whereas the behaviour of the parameter "STORE DOS ATTRIBUTES" was working as expected and described in Samba V3.0.x, its behaviour changed in a very strange way with V3.2.x and later. With V3.2.x and later the parameter is ignored (or to be precise deactivated) if the parent directory of the shared directory does not support extended attributes as well. The problem comes with the following code (smbd/dosmode.c) that was introduced with V3.2.x: sizeret = SMB_VFS_GETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, sizeof(attrstr)); if (sizeret == -1) { if (errno == ENOSYS #if defined(ENOTSUP) || errno == ENOTSUP) { #else ) { #endif DEBUG(1,("get_ea_dos_attributes: Cannot get attribute from EA on file %s: Error = %s\n", path, strerror(errno) )); set_store_dos_attributes(SNUM(conn), False); } return False; } Since Windows is trying to retrieve the attributes of the parent directory when accessing the shared directory. In this case the SMB_VFS_GETXATTR call returns 95 (ENOTSUP) and the STORE DOS ATTRIBUTES will be disabled. In V3.0.x that piece of code was completely different: sizeret = SMB_VFS_GETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, sizeof(attrstr)); if (sizeret == -1) { #if defined(ENOTSUP) && defined(ENOATTR) if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno != EACCES) && (errno != EPERM)) { DEBUG(1,("get_ea_dos_attributes: Cannot get attribute from EA on file %s: Error = %s\n", path, strerror(errno) )); set_store_dos_attributes(SNUM(conn), False); } #endif return False; } When accessing path=./.. the ENOTSUP error is ignored by that code and everthing is working fine. I guess that the behaviour of V3.2.x (and later) isn't the intended one. Yours sincerely Hans Lampl
Can you get me a debug level 10 log of this happening please, as well as your smb.conf. I need to see exactly when and why smbd is accessing ../ for a shared directory (it shouldn't be). Jeremy.
Created attachment 4775 [details] smb.conf
Created attachment 4776 [details] Level 10 log file The following actions have been performed: 1.) Start Samba 3.4.1 2.) Open a window with the Windows Explorer to display the shared directory 3.) Stop Samba
Created attachment 4955 [details] Logfile for dos attribute bug
Created attachment 4956 [details] smb.conf for samba 3.4.3