After running rsync with the -a --delete source dest arguments on my music library to my sd card I am getting the following errors.

default_perms_for_dir: sys_acl_get_file(Tears For Fears/Donnie Darko, ACL_TYPE_DEFAULT): No such file or directory, falling back on umask
rsync: mkstemp "/media/garrett/MUSIC-SD/Tears For Fears/Donnie Darko/.Mad World.mp3.yr2Xyc" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]

I don't really understand either one of these two erros. It's syncing from source to destination so how can it say 'No such file or directory'? If it's not there wouldn't it just copy it? And that's a very odd file '.Mad World.mp3.yr2xrc' that I can't even find when I look in the source directory myself. And I have no idea what 'ACL_TYPE_DEFAULT' is all about. Any ideas? Thanks.

Dani AI

Generated

Short answer: those two messages are separate but related. The ACL message means rsync tried to read the directory’s “default ACL” and either the destination filesystem doesn’t support POSIX ACLs or rsync asked for the ACL before the destination directory existed — rsync then falls back to the directory’s umask (this warning is usually benign). The mkstemp failure means rsync couldn’t create its temporary file for a copy (rsync writes files as a dot-prefixed temporary name then renames them into place); an ENOENT from mkstemp usually means the kernel refused to create the temporary file (missing path component, name rejected by the filesystem, read-only mount, full device, etc.). (lists.samba.org)

Why FAT32/SD cards are commonly involved: vfat/FAT32 does not implement POSIX ACLs and it also has filename rules Windows enforces (no trailing spaces or dots; certain characters like colon are forbidden). If your source contains names that the FAT driver rewrites or refuses (for example a directory name that ends with a dot), rsync’s temporary name or the final rename can fail with ENOENT. There are many past bug reports and examples of mkstemp/rename errors when copying from filesystems that allow names that FAT doesn’t. (learn.microsoft.com)

Concrete, practical steps to diagnose and fix:

  • Check mount, free space and read/write status: mount | grep MUSIC-SD and df -h /media/garrett/MUSIC-SD and dmesg | tail -n 50.
  • Look for filenames that FAT will choke on (forbidden chars or names ending in a dot):
    find /path/to/music -name '*[\\:\*?"<>|]*' -print
    find /path/to/music -regextype posix-extended -regex '.*\.$' -print
  • Workarounds: rename offending files (best), or tell rsync to create temps elsewhere (--temp-dir=/tmp) or avoid temporary files with --inplace (the latter has risks — read the man page). If the SD card can be reformatted to a POSIX filesystem (ext4) that also removes many of these problems. (stackoverflow.com)

Also: ’ read-only-card suggestion is worth checking (physical lock / mount flags), and ’s hint about weird names or root-folder issues is on target — search the tree for odd characters or trailing dots first.

Recommended Answers

All 7 Replies

The mkstemp C function failed to create a temporary directory (see man mkstemp). The yr2Xyc looks like a string generated by mkstemp according to this documentation. The question is why did the program fail to create a temporary directory on your SD card ? Are you sure the card is not READ ONLY ? Some cards have a physical switch to enable read only mode.

I don't think it's read only. My music library is syncing from my computer to the sd card fine except that I always get these two errors.

Tell me more. I had a rough time with some beginner when they filled to root folder of their FAT32 card. Maybe it's something basic?
(tell me how many files in the root.)

The sd card is formatted to FAT32 and it has an exact copy of my music foler. So it looks like this.

artist1/album1/musicFile1.flac
artist1/album1/musicFile.2flat
artist1/album2/musicFile1.flac
artist2/album1/musicFile1.flac
etc...

And what you shared has no spaces in any folder or file name. I wonder.

Yes, many band names, artits, album names and song names have spaces in them.

, why I noted it was so you could test is it's a space in the filename issue. Also can you reveal how many entries are in the root folder? I'm not there to check basics so I ask.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.