[PLUG] What could have caused my flash drive to be owned by root?

wes plug at the-wes.com
Mon Sep 2 04:04:31 UTC 2019


On Sun, Sep 1, 2019 at 5:57 PM John Jason Jordan <johnxj at gmx.com> wrote:

> I have a couple of 256GB PNY USB 3.0 sticks, less that a year old,
> which have had little use. One of them has been mounted in my laptop
> (Xubuntu 16.04, up to date) for about a week, with numerous read/writes.
> Suddenly, about an hour ago the laptop froze completely, no mouse, no
> keyboard. I had to use the power switch.
>
> On rebooting I left the flash drive plugged in. When the boot process
> was complete I could not mount it, and then I noticed that its red
> 'activity' light was flashing rapidly. After a bit of poking around I
> pulled it out, then re-inserted it. This time the light was flashing
> continuously, although more slowly. I still could not mount or view
> it, although the computer saw it.
>
> From the command line I found the problem, although it's strange. (Its
> label is '256GB-2.')
>
> $ cd /media/
> /media$ cd jjj/
> $ ls -la
> drwx------     2 root root   4096 Sep  1 17:11 256GB-2
> drwx------     8 jjj  jjj    4096 Mar 12 17:51 Data
> drwxr-xr-x  2847 jjj  jjj  221184 Sep  1 16:12 Movies
> drwxr-xr-x  2788 jjj  jjj  200704 Feb  9  2019 Synology
> jjj at Devil-Bonobo:/media/jjj$ cd 256GB-2/
> bash: cd: 256GB-2/: Permission denied
> jjj at Devil-Bonobo:/media/jjj$ sudo cd 256GB-2/
> sudo: cd: command not found
>
> I solved the problem with chown to retake ownership of the partition.
> But root can't use the cd command? And how come the partition became
> owned by root?
>
>
It's not that _root_ can't use cd, it's that cd is incompatible with
_sudo_. Use sudo ls or similar instead.

-wes



More information about the PLUG mailing list