rsync : pack_smb_acl: sys_acl_init(): Cannot allocate memory (12) error

parse error

A few days ago, my (self-made) backup system (based on rsync) started to complain :

rsync: pack_smb_acl: sys_acl_init(): Cannot allocate memory (12)

Googling the error led me to this thread where the almighty Mike Bombich was asking some question about rsync source code. To demonstrate his issue, he wrote :

On Mac OS X, a file with the system limit of 128 ACEs will consistently run into the error noted in the subject.

D*mn ! What if some file somewhere on the server had more than 128 ACEs ? That could explain the error !

So, once more, I fired up Terminal and wrote a little shellscript to find files that have a suspicious high number of ACEs.

First, write a very simple program that will count ACEs :


nb=$(ls -lde "$1" | wc -l | tr -d " ")

if [ $nbACE -gt 10 ]    # Change "10" with the value that best suits your need.
    echo "$1 ($nbACE)"

exit 0

Save it as and make it runnable.

And then, just use find like this (and as root) :

find "/Your/Path" -exec {} \; > ./TooManyACEs.log

It can take a while to run, so be patient :) But when finished, you'll find the culprit(s) in TooManyACEs.log.