I encountered an issue with a disk drive which I already posted on. (For the curious: Issue with device after formatting)
In short, one of my disks stopped allowing me to copy files by drag and drop using Dolphin (Debian), and allowed me only if I was doing it from the terminal using sudo.
I researched about my issue and noticed something:
This has already happened to me with another disk drive.
That disk drive and this one were erased with dd if=/dev/zero of=/dev/sdX where sdX is the drive in question
It did not happen with other disk drives which were not erased with dd but only formatted (with mkfs) and/or partitioned (e.g. gpt partition created with multiple primary partitions).
In that disk and this one, the owner was changed to root, and no longer user.
So my questions are:
Why did this happen with fully erased disks and not with formatted or partitioned disks?
How do permissions work exactly? Are they written into the disks? Or is ownership written into the disk?
Is it possible to change the owner of the disk so that the change is persistent across Linux distributions?
Edit: I tried to format the disk with exfat. Drap and drop with Dolphin works and the ownership is changed to user. I tried to format the disk with ext4. Drag and drop does not work anymore. The ownership was changed to root. I tried to change the ownership of the disk drive to the current user. The command line exited without issue (terminal: sudo chown ...: /dev/sdX -R -w). However, when using it with Dolphin, drag and drop does not work. Dolphin still lists ownership as root. If manually mounted from terminal, the directory created for mounting will only show ownership as root (even though the directory was created without requiring sudo). If automatically mounted from Dolphin, it will also only show ownership as root. Mount point name changes between two automatic mountings by Dolphin.
I should also add that I did format other drives with ext* filesystems. There are no issues with them (even with ext4) as long as I did not run dd if=... of=... on them (to erase them completely).
Can you explain to me what is going on?
Why does it seemingly show that ext* format automatically makes root the owner and the exfat format not? Both commands were run using mkfs.
Edit: Forgot to write that I use Debian.