AlistGo/alist · error

failed move for %+v, and failed try copying for %+v

Error message

failed move for %+v, and failed try copying for %+v

What it means

FTP fsmanage rename/move handler: fs.Move failed (typically EXDEV — cross-storage or cross-filesystem move), and the fallback fs.Copy within the same base also failed. Both errors are reported together: the move error and the copy error.

Source

Thrown at server/ftp/fsmanage.go:76

	}
	srcDir, srcBase := stdpath.Split(srcPath)
	dstDir, dstBase := stdpath.Split(dstPath)
	permSrc := common.MergeRolePermissions(user, srcPath)
	if srcDir == dstDir {
		if !common.HasPermission(permSrc, common.PermRename) || !common.HasPermission(permSrc, common.PermFTPManage) {
			return errs.PermissionDenied
		}
		return fs.Rename(ctx, srcPath, dstBase)
	} else {
		if !common.HasPermission(permSrc, common.PermFTPManage) || !common.HasPermission(permSrc, common.PermMove) || (srcBase != dstBase && !common.HasPermission(permSrc, common.PermRename)) {
			return errs.PermissionDenied
		}
		if err = fs.Move(ctx, srcPath, dstDir); err != nil {
			if srcBase != dstBase {
				return err
			}
			if _, err1 := fs.Copy(ctx, srcPath, dstDir); err1 != nil {
				return fmt.Errorf("failed move for %+v, and failed try copying for %+v", err, err1)
			}
			return nil
		}
		if srcBase != dstBase {
			return fs.Rename(ctx, stdpath.Join(dstDir, srcBase), dstBase)
		}
		return nil
	}
}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Read both errors: the first (%+v err) says why Move failed, the second why Copy failed — fix the Copy cause
  2. Check destination storage is writable and has space
  3. For cross-storage moves, ensure the destination driver supports upload (Copy needs it)
  4. Retry after fixing driver connectivity/credentials for the involved storages
Defensive patterns

Strategy: fallback

Validate before calling

if srcBase != dstBase && !sameDriverSupportsMove(srcStorage, dstStorage) {
    // plan an explicit copy+delete instead of relying on server-side fallback
}

Try / catch

if err := fs.Move(ctx, src, dst); err != nil {
    if _, copyErr := fs.Copy(ctx, src, dst); copyErr != nil {
        // both failed: report both errors, check writability/space on destination, retry after fixing
        return fmt.Errorf("move: %v; copy: %w", err, copyErr)
    }
    _ = fs.Remove(ctx, src)
}

Prevention

When it happens

Trigger: FTP RNFR/RNTO moving an entry where the source and destination live on different mounts/drivers so Move is unsupported, and Copy then fails on permissions, size limits, or the same underlying driver error.

Common situations: Moving files between two different storages mounted in AList via FTP; destination storage out of space or read-only; network storage driver failing copy of large files.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/e79ac93a974de071. Report an issue: GitHub.