Regarding the strace
, it doesn’t look like you were trying to do a move but a copy, correct? Let me snip out a bit of your log and remove some of the noise, but then add my annotations:
It's a bit long, so hit this to open it
# this checks to see if you can write to your home
[pid 2356] 09:27:52.202429 access("/home/jerome", W_OK) = 0
# this gets the mode and size of your home
[pid 2356] 09:27:52.202799 stat("/home/jerome", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
# this gets the mode and size of your test file
[pid 2356] 09:27:52.203111 lstat("/home/jerome/my_test_file", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
# these check permissions on your test file
[pid 2356] 09:27:52.203844 access("/home/jerome/my_test_file", R_OK) = 0
[pid 2356] 09:27:52.204150 access("/home/jerome/my_test_file", W_OK) = 0
# note that here the -1 status indicates failure, meaning the file is not executable (expected behavior)
[pid 2356] 09:27:52.204424 access("/home/jerome/my_test_file", X_OK) = -1 EACCES (Permission denied)
# the following check the status of the parents of your home
[pid 2356] 09:27:52.205036 lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 2356] 09:27:52.205388 lstat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
# this opens your file as read only
[pid 2356] 09:27:52.211803 openat(AT_FDCWD, "/home/jerome/my_test_file", O_RDONLY) = 29
# this opens a new read/writeable file at in your test folder with 664 permissions
[pid 2356] 09:27:52.212816 openat(AT_FDCWD, "/home/jerome/my_test/my_test_file", O_WRONLY|O_CREAT|O_EXCL, 0664) = 31
# this changes ownership of that new file to you
[pid 2356] 09:27:52.214081 lchown("/home/jerome/my_test/my_test_file", 1000, 1001) = 0
# this checks the mode and size of that new file
[pid 2356] 09:27:52.214487 lstat("/home/jerome/my_test/my_test_file", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
# this changes the permissions of that file to 664
[pid 2356] 09:27:52.214974 chmod("/home/jerome/my_test/my_test_file", 0100664) = 0
# this sets the access and modification times of your new file
[pid 2356] 09:27:52.215263 utimes("/home/jerome/my_test/my_test_file", [{tv_sec=1611166181, tv_usec=292216} /* 2021-01-20T19:09:41.292216+0100 */, {tv_sec=1611166081, tv_usec=175130} /* 2021-01-20T19:08:01.175130+0100 */]) = 0
# this indicates that the thread that was doing all of this work completed successfully
[pid 2356] 09:27:52.216309 +++ exited with 0 +++
So here’s me trying to do a copy:
It's a bit long, so hit this to open it
# this checks that I can write to the folder containing my test folder and file
[pid 62021] 13:33:22.710763 access("/home/lubuntu/New folder", W_OK) = 0
# this gets mode and size of containing folder
[pid 62021] 13:33:22.711178 stat("/home/lubuntu/New folder", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
# these check access of the test file
[pid 62021] 13:33:22.712191 access("/home/lubuntu/New folder/my_test_file", R_OK) = 0
[pid 62021] 13:33:22.712415 access("/home/lubuntu/New folder/my_test_file", W_OK) = 0
[pid 62021] 13:33:22.712623 access("/home/lubuntu/New folder/my_test_file", X_OK) = -1 EACCES (Permission denied)
# these check mode and size of parent folders
[pid 62021] 13:33:22.712850 lstat("/home/lubuntu/New folder", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 62021] 13:33:22.713065 lstat("/home/lubuntu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 62021] 13:33:22.713282 lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 62021] 13:33:22.713570 lstat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
# this checks extended attributes of my test file
[pid 62021] 13:33:22.713924 statx(AT_FDCWD, "/home/lubuntu/New folder/my_test_file", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0664, stx_size=0, ...}) = 0
# this opens the test file read only
[pid 62021] 13:33:22.714302 openat(AT_FDCWD, "/home/lubuntu/New folder/my_test_file", O_RDONLY) = 29
# these get extended attributes of the file descriptor representing the test file
[pid 62021] 13:33:22.714573 statx(29, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0664, stx_size=0, ...}) = 0
[pid 62021] 13:33:22.714899 statx(29, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0664, stx_size=0, ...}) = 0
# this creates the new test file in the test folder with permissions
[pid 62021] 13:33:22.715369 openat(AT_FDCWD, "/home/lubuntu/New folder/my_test_folder/my_test_file", O_WRONLY|O_CREAT|O_EXCL, 0664) = 30
# this gets extended attributes of the file description representing the new test file
[pid 62021] 13:33:22.716107 statx(30, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_MTIME, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0664, stx_size=0, ...}) = 0
# this changes ownership of the new test file
[pid 62021] 13:33:22.716520 lchown("/home/lubuntu/New folder/my_test_folder/my_test_file", 1000, 1001) = 0
# this opens the test file under a new file descriptor read only
[pid 62021] 13:33:22.716796 openat(AT_FDCWD, "/home/lubuntu/New folder/my_test_folder/my_test_file", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 29
# this gets the mode and size of the file descriptor representing the new test file
[pid 62021] 13:33:22.717020 newfstatat(29, "", {st_mode=S_IFREG|0664, st_size=0, ...}, AT_EMPTY_PATH) = 0
# this changes the permissions to 664 of the file descriptor representing the new test file
[pid 62021] 13:33:22.717240 chmod("/proc/self/fd/29", 0100664) = 0
# this changes the access and modification times of the new file
[pid 62021] 13:33:22.717470 utimensat(AT_FDCWD, "/home/lubuntu/New folder/my_test_folder/my_test_file", [{tv_sec=1611351164, tv_nsec=947931000} /* 2021-01-22T13:32:44.947931000-0800 */, {tv_sec=1611351164, tv_nsec=947931000} /* 2021-01-22T13:32:44.947931000-0800 */], 0) = 0
# thread finishes successfully
[pid 62021] 13:33:22.718307 +++ exited with 0 +++
As you can see, there are some differences, most likely due to me running a development version, but it kind of seems like everything worked out very similarly and without errors. So now I’m really confused.