Posts: 227
Threads: 33
Joined: Aug 2014
Reputation:
0
03-25-2015, 12:54 PM
(This post was last modified: 03-27-2015, 01:55 PM by Scott(0).)
I have a thumb drive that I've been using (successfully) for about a year. I've always had read/write permissions and could obviously delete anything I wanted. As of this morning, everything has become locked. I am unable to delete ANYTHING. I haven't done anything different with the thumb drive or with LL (2.2, if it matters). It won't let me change the permissions, either. I can't even edit and save any documents (for example, I have my job resume on the drive).
Any suggestions? I use this daily and I need to be able to delete old files from it.
Posts: 1,255
Threads: 21
Joined: Aug 2014
Reputation:
0
just to give you a idea
Code:
$ ls -l
total 1444
-rw-r--r-- 1 harry harry 458669 Nov 30 15:42 BC.JPG
-rw-r--r-- 1 harry harry 504361 Nov 30 15:41 S&R1.JPG
-rw-r--r-- 1 harry harry 509912 Nov 30 15:41 S&R2.JPG
You can cd into /dev/sdx (pendrive) and list permissions in there.
Hopefully the chown command may bail you out later but 1st you need to list permissions already given.
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Posts: 227
Threads: 33
Joined: Aug 2014
Reputation:
0
Says there's no such file/folder.
Posts: 1,255
Threads: 21
Joined: Aug 2014
Reputation:
0
the x in sd(x) needs to be replaced with the drive letter b,c,d whatever that your pendrive shows up as.
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Posts: 227
Threads: 33
Joined: Aug 2014
Reputation:
0
Please remind me how to find the drive letter?
Posts: 688
Threads: 49
Joined: Jul 2014
This will list all usb drives
Code:
ls -al /dev/disk/by-path/*usb*part* 2>/dev/null | awk '{print($11)}'
The output will be like this
../../sdc1
../../sdb1
Then, as Harry said, if your usb drive is
sdb1 for example
Also use lsblk to see where is the device mounted
Code:
lsblk 2>/dev/null | grep sdb1
└─sdb1 8:17 1 7,6G 0 part /media/linuxlite/U S B S
In my case '/media/linuxlite/U S B S'
So I use ls -l to check ownership and permisions
Code:
ls -l '/media/linuxlite/U S B S'
-rw-r--r-- 1 linuxlite linuxlite 199522 јул 17 2010 Photo0074.jpg
-rw-r--r-- 1 linuxlite linuxlite 1032528 јул 6 2014 Photo0349.jpg
-rw-r--r-- 1 linuxlite linuxlite 1032641 јул 6 2014 Photo0350.jpg
-rw-r--r-- 1 linuxlite linuxlite 1003211 јул 6 2014 Photo0351.jpg
Posts: 227
Threads: 33
Joined: Aug 2014
Reputation:
0
03-25-2015, 03:06 PM
(This post was last modified: 03-25-2015, 03:09 PM by Monkeyman.)
After the first command, I get this:
brw-rw---- 1 root disk 8, 81 Mar 25 10:57 /dev/sdf1 (If it matters, the "/dev/sdf1" is highlighted in yellow. No idea what that means.)
I get absolutely nothing after the "ls -l" command. Used the same letter case, etc as what showed up after the "lsblk" command.
EDIT: I have another thumb drive (very slow USB 2.0) that works fine so it's not the USB port.
Posts: 1,094
Threads: 19
Joined: Feb 2014
Reputation:
0
Some USB's have a way to enable write protection. I don't have any of those myself, but sounds like yours might be one of those. Look for some type of slider, button, or some other mechanical feature on the USB that may have gotten moved to enabled write protection by accident. If don't see anything obvious, lookup the exact USB model number you have on the internet -- maybe instructions you find will tell you how that feature works and you can disable it again.
Posts: 530
Threads: 26
Joined: Feb 2015
Reputation:
0
It would seem that this can also be caused by an unsafe eject of the drive, or if the drive has been inserted into a computer that has a virus on it. This link may be of help.
http://sharadchhetri.com/2013/12/19/how-...in-ubuntu/
“I have not failed. I’ve just found 10,000 ways that won’t work.” - Thomas Edison
Posts: 227
Threads: 33
Joined: Aug 2014
Reputation:
0
Thank you, everyone. The drive seems to have fixed itself. I forgot to remove it from the case and after a couple of reboots (which I would have done anyway), it started working. No idea what the problem is/was but I have a new thumb drive on order in case the old one is just temperamental from age.