User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Auto-mounted USB drive permissions "confusion"?

Thu Mar 19, 2020 2:27 pm

Background: I use two USB3 DataTraveler USB sticks with one of my P4B's one of which is always plugged in, the other only when I'm backing up, usually via Unison. Today my backup failed because the backup drive which had been plugged in after boot appeared to be "read only" for the pi user, subsequently discovered to be, as far as the file manager was concerned "owned" by root.
DTG4V64GB_perms.jpg
DTG4V64GB_perms.jpg (122.33 KiB) Viewed 121 times
The command line "disagrees":

Code: Select all

pi@raspiP4B4b-32GbP:~ $ uname -a
Linux raspiP4B4b-32GbP 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
pi@raspiP4B4b-32GbP:~ $ ls -laF /media/pi/
total 56
drwxr-x---+  4 root root  4096 Mar 19 13:58 ./
drwxr-xr-x   3 root root  4096 Jun 20  2019 ../
drwxr-xr-x   5 pi   pi   32768 Jan  1  1970 DTG4V64GB/
drwxr-xr-x  10 pi   pi   16384 Mar 19 13:53 KINGSTON/
DTG4V64GB is the drive plugged in after boot, KINGSTON is that plugged in "permanently".

If I boot with them both plugged in all is fine. Also the desktop shortcut shows ownership by pi. Has anyone else come across this "buglet"?
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “Troubleshooting”