Artifacts Associated With Ticket 1523045
Ticket change [afb84fb0e0] (rid 97860) by bernhard_sr on 2006-07-15 12:35:56:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
On Linux (Kernel 2.6.5-7.111.19, glibc-2.3) copying the file "short" to a directory on a VFAT filesystem fails, file copy short /D/home/bs error copying "short" to "/D/home/bs/short": not owner The actual copying works fine but since the target's permissions can not be set, the copy is unlinked and an error is generated afterwards. The strace outputs is --------------------------------------------- lstat64("short", {st_mode=S_IFREG|0644, st_size=13, ...}) = 0 lstat64("/windows/D/home/bs/short", 0xbfffe5d8) = -1 ENOENT (No such file or di unlink("/windows/D/home/bs/short") = -1 ENOENT (No such file or directory) open("short", O_RDONLY|O_LARGEFILE) = 6 open("/windows/D/home/bs/short", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0100644) read(6, "file to copy\n", 4096) = 13 write(7, "file to copy\n", 13) = 13 read(6, "", 4096) = 0 close(6) = 0 close(7) = 0 chmod("/windows/D/home/bs/short", 0644) = -1 EPERM (Operation not permitted) chmod("/windows/D/home/bs/short", 0644) = -1 EPERM (Operation not permitted) unlink("/windows/D/home/bs/short") = 0 write(1, "error copying \"short\" to \"/D/hom"..., 56) = 56 -------------------------------------- - foundin initialized to: "obsolete: 8.5a4"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "bernhard_sr"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "file cmd fails to copy to VFAT"
- type initialized to: "Bug"
Ticket change [15ed65ce90] (rid 124643) by dkf on 2006-08-04 00:19:25:
- assignee changed to: "vincentdarley"
- subsystem changed to: "37. File System"
Ticket change [b232f71166] (rid 259627) by serhiy.storchaka on 2026-10-20 21:33:41:
- icomment:
Still present in 8.6, 9.0 and 9.1: after copying the data, <nowiki>[file copy]</nowiki> sets the mode and the times of the new file, and when that fails with EPERM (VFAT and similar filesystems) it removes the copy and reports an error. Copying a directory fails the same way and leaves a partial tree. Proposed fix in branch [/timeline?r=copy-eperm-attrs|copy-eperm-attrs], also for [731062ffff]: EPERM from <tt>chmod()</tt> and <tt>utime()</tt> of the newly created file is ignored, as cp does, so the copy is kept (without the mode or times that the filesystem cannot store). Tested with an LD_PRELOAD shim that makes these calls fail; no test in the suite, since it needs such a filesystem.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [73177a9242] (rid 261435) by jan.nijtmans on 2026-11-11 14:35:12:
- assignee changed to: "jan.nijtmans"
- closer changed to: "nobody"
- comment changed to:
On Linux (Kernel 2.6.5-7.111.19, glibc-2.3) copying the file "short" to a directory on a VFAT filesystem fails, file copy short /D/home/bs error copying "short" to "/D/home/bs/short": not owner The actual copying works fine but since the target's permissions can not be set, the copy is unlinked and an error is generated afterwards. The strace outputs is --------------------------------------------- lstat64("short", {st_mode=S_IFREG|0644, st_size=13, ...}) = 0 lstat64("/windows/D/home/bs/short", 0xbfffe5d8) = -1 ENOENT (No such file or di unlink("/windows/D/home/bs/short") = -1 ENOENT (No such file or directory) open("short", O_RDONLY|O_LARGEFILE) = 6 open("/windows/D/home/bs/short", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0100644) read(6, "file to copy\n", 4096) = 13 write(7, "file to copy\n", 13) = 13 read(6, "", 4096) = 0 close(6) = 0 close(7) = 0 chmod("/windows/D/home/bs/short", 0644) = -1 EPERM (Operation not permitted) chmod("/windows/D/home/bs/short", 0644) = -1 EPERM (Operation not permitted) unlink("/windows/D/home/bs/short") = 0 write(1, "error copying \"short\" to \"/D/hom"..., 56) = 56 -------------------------------------- - login: "jan.nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Pending"
Ticket change [6839eac734] (rid 261596) by jan.nijtmans on 2026-11-13 18:49:07:
- closedate changed to: "2461358.2841160302"
- closer changed to: "jan.nijtmans"
- icomment:
Merged in [6e7c8299c5|trunk], core-9-0-branch and core-8-6-branch Many thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- status changed to: "Closed"