USB drive auto-mounted by user but gets write permissions for root only
A possible reason could be that you formatted/created the storage disk with a tool with root privilege and so the file-system created was owned by the root.
Let's have a look at the o/p of your ls
commands:
$ ls -ld /media/adam/WDPassport2T
drwxr-xr-x 4 root root 4096 Jan 15 16:57 /media/adam/WDPassport2T
$ ls -l /media/adam/WDPassport2T
total 20
drwxr-xr-x 2 root root 4096 Jan 15 16:57 backuppc
drwx------ 2 root root 16384 Jan 15 15:37 lost+found
The file-system is owned by the root, as indicated by ls -ld
for your mount WDPassport2T and the permission string drwxr-xr-x
shows the owner root has the RW permissions while, the members of group root along with the world/others will only have R-permission.
To solve you could change the permissions with chmod
or just change the ownership recursively, and this is what I've shown below:
sudo chown <username>:<groupname> -R /path/to/target
which in your case would be:
sudo chown adam:adam -R /media/adam/WDPassport2T/
Now if you need, you may also set the permissions with chmod
:
find /media/adam/WDPassport2T/ -type f -execdir chmod 666 -Rv {} +
(which gives owner, group and the world RW permissions for all the files in the target.)
find /media/adam/WDPassport2T/ -type d -execdir chmod 777 -Rv {} +
(which gives owner, group and the world RWX permissions for all the directories in the target.)
Reference:
Official Ubuntu Documentation: File Permissions
Have you tried re-formating the drive with your own permissions?
First, check your user id:
sudo id -u red
It should give "1000"
Next, unmout the drive in filemanager.
Be careful, you will lose all your data with the next comand
sudo mkfs.ext4 /dev/sdx1 -E root_owner=1000:1000
Mount the drive and you should be able to write files and folders