Error: "ProcessAttribute: failed getting 135292-byte attribute"- When Copying Folders Recursively

Error: "ProcessAttribute: failed getting 135292-byte attribute"- When Copying Folders Recursively

book

Article ID: CTX223473

calendar_today

Updated On:

Description

The import task will fail with this: The CachePoint Appliance could not import the gold image VM to create the Operating System Layer.  Error is: Failed to copy folders recursively. Details:

Note there are other reasons you could have a failure to copy files recursively. Always check UniSysLibLog for details.

You may also see this error when publishing, if the offending file was added in an app layer.  The error for the task in the Management Console will say:

A failure occurred while publishing the Layered Image: Failed to process a file system attribute for a file or directory.
You will see this in the UniSysLibLog file - 

2017-04-24 15:37:48 ERROR 13027 [uni.ca.syslib.copyfolder] ProcessAttribute: failed getting 135292-byte attribute 'user.favicon' for file '/mnt/CAMS/B72F0BB00035D5E_PB72F0BB00035D5E_B0_R0_V0_mpt/Users/Installer/Favorites/whatever.url', errno 7 (Argument list too long)

The file it is specifically failing on is "C:/Users/Installer/Favorites/whatever.url". However this could be any file. The important thing is the error "ProcessAttribute: failed getting 135292-byte attribute". 

Resolution

The simplest option is to delete the offending file from the gold VM (or packaging machine if this is a file in a layer) and retry the operation again. Make sure you empty the Recycle Bin. To identify the file, look at the full path in the error message.  From the example above:

/mnt/CAMS/B72F0BB00035D5E_PB72F0BB00035D5E_B0_R0_V0_mpt/Users/Installer/Favorites/whatever.url

Everything up to _mpt is the local mount point in the appliance VM; everything after it is the path from the mounted disk.  So in this example, your offending file is C:\Users\Installer\Favorites\whatever.url.

An alternative would be to use the Microsoft Sysinternals Streams utility. It will show the alternate streams and sizes on a file and the -d parameter can be used to delete the alternate streams.  This will leave the shortcut intact without its favicon.  To perform this, download, unblock and unpack SysInternals, or at least streams.exe. Go to the offending file and run "streams.exe file.ext" to see what it says.  Or "streams.exe *.*" to see all files.
 
C:\Users\Installer\Favorites>streams *.*

streams v1.60 - Reveal NTFS alternate streams.
Copyright (C) 2005-2016 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\Users\ganderson\Favorites\BizSpark.url:
         :favicon:$DATA 3638
C:\Users\ganderson\Favorites\Chat Portal.url:
         :favicon:$DATA 1014
C:\Users\ganderson\Favorites\whatever.url:
         :favicon:$DATA 135292

To delete the alternate data streams without deleting the file content, run "streams.exe -d file.ext".

Problem Cause

This is a limitation of NTFS-3G, the NTFS system we use to read ad write Windows filesystems.  It can only support file attributes up to about 64KB.  Anything larger causes the copy operation to fail. Larger attributes are certainly legal, we just can't exceed the limitation of the tools we use.

The user.favicon is actually stored as an alternate data stream on the file.  Its size is not included by explorer when it reports file size.

Issue/Introduction

The CachePoint Appliance could not import the gold image VM to create the Operating System Layer.  Error is: Failed to copy folders recursively. Details: