Opened 11 years ago

Closed 9 years ago

#226 closed defect (fixed)

Copying directory tree with EAs attached to directories only copies EAs to first level

Reported by: Lewis Rosenthal Owned by:
Priority: Feedback Pending Milestone: Netdrive plugin 2.2.x
Component: Samba Client Plugin Version: Client 2.1.x
Keywords: extended attributes, copy, EA, directory, tree Cc:

Description

NetDrive 3.1.4 connecting to Thecus N2200EVO (XFS filesystem; ea support enabled in smb.conf). Plugin is 2.1.4 build GA-20130827.

Copying a directory tree with EAs attached to directories (e.g., C:\Desktop) results (from CMD.EXE and 4OS2.EXE) in only the first level directory receiving EAs.

Example:

H: is mapped to Samba share.

[C:\]xcopy c:\Desktop h:\Desktop /s/e/h/r/t

Source files are being read...

The extended attributes for the file or directory were
discarded because the target file system does not support them.

The extended attributes for the file or directory were
discarded because the target file system does not support them.

The extended attributes for the file or directory were
discarded because the target file system does not support them.

The extended attributes for the file or directory were
discarded because the target file system does not support them.

The extended attributes for the file or directory were
discarded because the target file system does not support them.

The extended attributes for the file or directory were
discarded because the target file system does not support them.

The extended attributes for the file or directory were
discarded because the target file system does not support them.

C:\Desktop\Internet\Dial-up Tools\Internet Assistant for eComStation\Internet\Te
am OS!2 Deutschland e.V.^(Germany)^homepage
C:\Desktop\Internet\InJoy Firewall\Information\F!X Communication
C:\Desktop\Internet\InJoy Firewall\Information\Online Documentation
(etc.)

after which:

[C:\]dir h:

The volume label in drive H is NETDRIVE.
Directory of H:\

 8-27-13  7:18p         <DIR> 19,211 ----  Desktop
        1 file(s)           0 bytes used
                   35,370,565 K bytes free

[C:\]dir h:\Desktop\Internet

The volume label in drive H is NETDRIVE.
Directory of H:\Desktop\Internet

 8-27-13  7:07p         <DIR>      0 ----  .
 8-27-13  7:07p         <DIR>      0 ----  ..
 8-27-13  7:29p         <DIR>      0 ----  Arora Web Browser
 8-27-13  7:29p         <DIR>      0 ----  Dial-up Tools
 8-27-13  7:29p         <DIR>      0 ----  EmTec Network Suite
 8-27-13  7:29p         <DIR>      0 ----  Firefox
 8-27-13  7:29p         <DIR>      0 ----  FtpServer
 8-27-13  7:29p         <DIR>      0 ----  Help
 8-27-13  7:29p         <DIR>      0 ----  InJoy Firewall
 8-27-13  7:29p         <DIR>      0 ----  Internet Utilities
 8-27-13  7:29p         <DIR>      0 ----  QBittorrent
 8-27-13  7:29p         <DIR>      0 ----  QupZilla Web Browser
 8-27-13  7:29p         <DIR>      0 ----  SeaMonkey
 8-27-13  7:29p         <DIR>      0 ----  Web Sites
       14 file(s)           0 bytes used
                   35,369,517 K bytes free

Interestingly, files, no matter how deep, retain their EAs, and a second xcopy (or copy) pass will get the balance of the directory EAs copied. Note the same example as above, but after a repeat of the first command:

[C:\]dir h:\Desktop\Internet

The volume label in drive H is NETDRIVE.
Directory of H:\Desktop\Internet

 8-27-13  7:07p         <DIR>      0 ----  .
 8-27-13  7:07p         <DIR>      0 ----  ..
 8-27-13  7:29p         <DIR>    676 ----  Arora Web Browser
 8-27-13  7:29p         <DIR> 18,725 ----  Dial-up Tools
 8-27-13  7:29p         <DIR>    686 ----  EmTec Network Suite
 8-27-13  7:29p         <DIR>    726 ----  Firefox
 8-27-13  7:29p         <DIR>    460 ----  FtpServer
 8-27-13  7:29p         <DIR> 18,701 ----  Help
 8-27-13  7:29p         <DIR> 11,187 ----  InJoy Firewall
 8-27-13  7:29p         <DIR> 18,728 ----  Internet Utilities
 8-27-13  7:29p         <DIR>    637 ----  QBittorrent
 8-27-13  7:29p         <DIR>    713 ----  QupZilla Web Browser
 8-27-13  7:29p         <DIR>    905 ----  SeaMonkey
 8-27-13  7:29p         <DIR> 18,786 ----  Web Sites
       14 file(s)           0 bytes used
                   35,370,565 K bytes free

Change History (7)

comment:1 by Silvan Scherrer, 11 years ago

Milestone: Netdrive plugin 2.2.x
Priority: minorFeedback Pending

what happens if you try the same to a eCS samba server?

comment:2 by Silvan Scherrer, 11 years ago

Milestone: Netdrive plugin 2.2.xNetdrive plugin 2.2

Milestone Netdrive plugin 2.2.x deleted

comment:3 by Lewis Rosenthal, 10 years ago

Just tested with the following:

NetDrive plugins:

2.1.5 GA 20131003
2.2.0 Beta4 20140226
ndpsmb-samba_3.5-krb5-20150910

against OS/2 Samba server:

3.5.19

First copy of Desktop directory:

 6-08-15   2:56         <DIR>        0   ____D  .
 6-08-15   2:56         <DIR>        0   ____D  ..
 6-08-15   3:01         <DIR>      124   ____D  Apache OpenOffice 4.1
 6-08-15   3:00         <DIR>      124   ____D  Internet
 6-08-15   3:00         <DIR>      124   ____D  Local Network
 6-08-15   3:00         <DIR>      124   ____D  Local System
 6-08-15   3:01         <DIR>      124   ____D  Programs
 6-08-15   3:01         <DIR>      124   ____D  Templates
 6-08-15   3:01         <DIR>      124   ____D  Trash Can
 6-08-15   3:01         <DIR>      124   ____D  XWorkplace Installation

Note that .. actually does have EAs attached (it was the first level copied):

 6-08-15   3:05         <DIR>    1,355   ____D  Desktop

A second pass gets the EAs pushed (and the original noise about EAs not being supported is repeated during the second copy):

 6-08-15   2:56         <DIR>        0   ____D  ..
 6-08-15   3:05         <DIR>   16,344   ____D  Apache OpenOffice 4.1
 6-08-15   3:04         <DIR>   18,860   ____D  Internet
 6-08-15   3:04         <DIR>   18,874   ____D  Local Network
 6-08-15   3:04         <DIR>   18,862   ____D  Local System
 6-08-15   3:04         <DIR>   18,866   ____D  Programs
 6-08-15   3:05         <DIR>   18,861   ____D  Templates
 6-08-15   3:05         <DIR>      696   ____D  Trash Can
 6-08-15   3:05         <DIR>   16,376   ____D  XWorkplace Installation

(.. is still out of sync with reality.)

On the server machine, . has 1430 bytes EAs and .. has 1235. Also, Trash shows 771 bytes, and the other dirs are off by the same amount as Trash.

The behavior is consistent across client versions.

(Copying to NetWare CIFS, I get 0 bytes EAs consistently, and no errors reported. NetWare CIFS does not support EAs, though the filesystem does. The dropping of the EAs may not be reported because the CIFS implementation silently ignores them, and the client is then unaware that anything has been lost.)

comment:4 by Silvan Scherrer, 10 years ago

please attach a log file

comment:5 by Lewis Rosenthal, 9 years ago

Sorry, Silvan; missed the notification.

Log files too big to attach. We can snip them, but the complete logs are here:

ftp://ftp.2rosenthals.com/pub/Samba/ticket-226/log.ndpsmb-1st-copy

ftp://ftp.2rosenthals.com/pub/Samba/ticket-226/log.ndpsmb-2nd-copy

The 1st copy is the initial copy to the server showing only the first level EAs copied. The 2nd copy shows the EAs being copied, in spite of the error message that EAs are not supported.

These were taken with:

ndpsmb-samba_4.2.2-heimdal-20150626.zip

against Windows 2008 R2, over SMB3, though the transport protocol does not seem to matter (my initial tests were against NetWare CIFS, over SMB).

comment:6 by Lewis Rosenthal, 9 years ago

Once Paul checks his code in, we can close this bug. There are other EA issues to be sure, but this one is fixed (currently using ndpsmb-samba_4.2.2-heimdal-20150628b.zip).

comment:7 by Silvan Scherrer, 9 years ago

Resolution: fixed
Status: newclosed

fixed in r892

Note: See TracTickets for help on using tickets.