Copying/Extracting large amounts of files into superuser directories from user home does not work as expected
Affected version
- Nightly flatpak: Apologies, cannot test due to time constraints right now
- Other: Fedora 36, Files 42.2, btrfs
Steps to reproduce
- Have a folder with a very large number of files, folders, and symlinks between these files and folders. Tested with 75,000 , 150,000 and 350,000. In my example these were icon themes located in ~/.icons.
- Either: copy these files to a superuser-only directory (/usr/share/icons in my case) OR make them into a tarball, move the tarball, extract the tarball at the destination.
- Type in the superuser password when prompted
Current behavior
With both copying and extraction: about 1000-2000 files are rapidly copied/extracted to the destination, then the copying/extraction stops for about 5 minutes. The copying status popover reports a speed of 900 bytes - 2 KB per second, the disk io actually states nothing is happening. As soon as 5 minutes elapse, the user is prompted for another superuser password, which copies another 1000-2000 files and the issue repeats.
Expected behavior
2.5 issues here:
- The files should be properly copied/extracted to their destination, seems to be some sort of access issue here.
- In case the files are legitimately just being copied slowly (assuming several large files and slow HDDs) to superuser directories, the user should not be prompted for passwords again. In other words, superuser privileges should work for all files placed into the copy/extaction queue, even if they would have timed out normally. 2.5. Perhaps the popover should inform the user if something is going wrong
Limitations of my tests
- I copied using Cut and Paste or Drag and Drop, not using the copy menu
- Copying was always done from a home folder without going superuser in that window, into a different window at the destination with elevated privileges
- The files are copied/extracted normally when done using the terminal (using cp/mv/tar) with sudo
- Copying/extracting within user directories works normally
- I did not test copying between superuser directories, but considering the extraction of a tarball already within a superuser directory runs into this issue, I presume I would see similar results.
Edited by Nereithr