ntfs-3g, cp and 'Bad address' errors - further
frank2 at fjl.co.uk
Thu Jan 30 20:13:09 UTC 2014
On 30/01/2014 19:24, Frank Leonhardt wrote:
> I'm getting weird things happening when I use cp -a to copy files from
> an ntfs volume to zfs. On a few files I'm seeing:
> cp: /data/<snip>avi: Bad address
> (This is the destination file name)
> I'm also getting some like:
> cp: sourcename<snip>avi: Permission denied
> These are, so far, weird files - sometimes in the Windows recycle bin;
> sometimes files originating on a Macintosh and uncompressed to the
> ntfs volume on a Windows box - particularly the "Bad Address" version.
> I don't mind permission denied.
> Although it's affected less than 1% of the files, and I don't care
> about them, I still want to know what's going on. I assume that
> something is passing back an EFAULT (error 14) and decoding it using
> libc. EFAULT is defined as:
> Bad address. The system detected an invalid address in attempting to
> use an argument of a call.
> Having trawled through the source the only place an error message in
> this format could come from is seems to be directory searching code in
> cp.c, which doesn't make a lot of sense (around like 285 in
> I don't even know whether to blame ZFS or ntfs-3g, although EFAULT
> errors have been noted as a problem with the latter in other posts
> questioning its reliability.
> Does anyone know what's going on here?
> Thanks, Frank.
Further to this, looking more closely at various files they were almost
certainly encrypted to the user. Attempting to open them results in read
error. For some reason cp displays "Permission denied" and the source
file name OR "Bad address" and the destination file name, and I can't
see anything different about the files in question. That the files
cannot be read is okay - they're supposed to be encrypted. Why some of
the error messages are misleading remains a question.
More information about the freebsd-questions