Skip to main content

Thread: can't change ownership of usb drive


well has changed on system , can't figure out.

had usb drive wifes car had music syncing rhythmbox.

plugged in laptop , owned root , cant change it. tried changing entries in /media directory plugin usb drive ownership reverts root. if try changing ownership error.

before plugging:

root@pearl:/media# ls -ltra
total 84
drwx------ 4 knic knic 16384 1969-12-31 19:00 3132-6462
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb7
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb6
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb5
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb4
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb3
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb2
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb1
drwx------ 1 knic knic 8192 2011-10-27 18:04 os
drwxr-xr-x 27 root root 4096 2011-12-10 09:54 ..
drwxr-xr-x 2 knic knic 4096 2011-12-28 17:06 usbstick
drwxr-xr-x 2 knic knic 4096 2011-12-31 17:40 usb0
lrwxrwxrwx 1 root root 4 2011-12-31 17:41 usb -> usb0
drwxr-xr-x 13 knic knic 4096 2011-12-31 17:41 .


after plugging:

root@pearl:/media# ls -ltra
total 84
drwxr-xr-x 3 root root 4096 1969-12-31 19:00 usb0
drwx------ 4 knic knic 16384 1969-12-31 19:00 3132-6462
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb7
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb6
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb5
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb4
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb3
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb2
drwxr-xr-x 2 knic knic 4096 2010-10-06 20:51 usb1
drwx------ 1 knic knic 8192 2011-10-27 18:04 os
drwxr-xr-x 27 root root 4096 2011-12-10 09:54 ..
drwxr-xr-x 2 knic knic 4096 2011-12-28 17:06 usbstick
lrwxrwxrwx 1 root root 4 2011-12-31 17:41 usb -> usb0
drwxr-xr-x 13 knic knic 4096 2011-12-31 17:41 .

changing owner....


root@pearl:/media/usb# ls -ltra
total 28
drwxr-xr-x 3 root root 4096 1969-12-31 19:00 .
-rwxr-xr-x 1 root root 34 2011-10-23 20:00 .is_audio_player
-rwxr-xr-x 1 root root 552 2011-10-23 21:06 marcy-car.pls
drwxr-xr-x 2 root root 12288 2011-12-27 23:18 mp3
drwxr-xr-x 13 knic knic 4096 2011-12-31 17:41 ..
root@pearl:/media/usb# chown knic.knic *
chown: changing ownership of `marcy-car.pls': operation not permitted
chown: changing ownership of `mp3': operation not permitted
root@pearl:/media/usb# ls -ltra
total 28
drwxr-xr-x 3 root root 4096 1969-12-31 19:00 .
-rwxr-xr-x 1 root root 34 2011-10-23 20:00 .is_audio_player
-rwxr-xr-x 1 root root 552 2011-10-23 21:06 marcy-car.pls
drwxr-xr-x 2 root root 12288 2011-12-27 23:18 mp3
drwxr-xr-x 13 knic knic 4096 2011-12-31 17:41 ..

please post code between [code] , [/code] tags make easier read (or highlight code , press # button in toolbar).

entry wife's usb -- /media/usb?

belongs root, you cannot change owner. can, administrator, change using sudo.
code:
sudo chown knic:knic /media/usb
however, intrigues me folders in /media. normally, when plug in usb, automatically creates new folder in /media, assigns you, , lets access (so don't have fiddle ownership). when "safely remove" device, automatically unmounts , deletes folder. shouldn't have whole bunch of folders belonging in /media.

may suggest unplug usb devices (safely remove them); , delete entries in /media -- empty!

log out, log in, , try again.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] can't change ownership of usb drive


Ubuntu

Comments