I know about the overlayfs that it treats lower directory as a read-only and copy_up when we want to modify the lower file
so is there any way to modify the lower file and it can copy the modified file to the lower directory?
From https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt
Changes to the underlying filesystems while part of a mounted overlay filesystem are not allowed. If the underlying filesystem is changed, the behavior of the overlay is undefined, though it will not result in a crash or deadlock.