USB flash drive permissions seem to be mashed

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

USB flash drive permissions seem to be mashed

Postby bwjpg on Wed Jul 01, 2009 3:13 pm

An enigma wrapped in a conundrum surrounded by a mystery for you to consider.

I have a 4Gb PNY flash drive. Never given me any problems.

I copied some video files from Mint 6 to another computer running Fedora 11

The drive was set up with FAT32

Now I can't delete any (or all of the files).

When I try to change permissions it just says "The permissions of "disk" could not be determined"

I have read all the forum posting which might be of some help.

I tried fiddling about with fstab as in

viewtopic.php?f=49&t=18497&p=110531&hilit=usb+flash+drive#p110531

But that didn't work.

I tried Lolo's quite clever solution from

viewtopic.php?f=90&t=12482&p=77830&hilit=usb+flash+drive#p77830

but that didn't work. Terminal said the operation wasn't permitted.

I hope I have the luck of Kymac

viewtopic.php?f=90&t=11533&p=70986&hilit=usb+flash+drive#p70986

Using root doesn't make any difference. ditto for sudo in terminal.

I tried using GParted to format the drive but it shows a ring of keys next to the drive and has most of the options, including format to, greyed out.

Windows is no help and even the normally solid command prompt in Windows says no you don't have permission.

I think that wherever on the drive the permissions settings are stored has become corrupt and now I need a fail safe way of completely formatting the drive and starting from scratch.

In every environment (Windows, Fedora and Mint) the stick plays the files on it fine. That is to say it reads everything fine.

Permissions have just been mashed.
User avatar
bwjpg
Level 2
Level 2
 
Posts: 51
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Linux Mint is funded by ads and donations.
 

Re: USB flash drive permissions seem to be mashed

Postby bwjpg on Wed Jul 01, 2009 3:19 pm

Oh one other thing when I first plugged the drive in to the Fedora 11 (with ext4) machine nothing happened.

So I didn't do anything to the computer (there was nothing to unmount) I just pulled the flash drive out and put it back in the socket thinking that I hadn't properly inserted it.

After that it worked fine and I copied the files across.

It was only when I tried to delete the contents of the disk with Fedora I noticed there was a problem...
User avatar
bwjpg
Level 2
Level 2
 
Posts: 51
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Postby bwjpg on Sat Jul 04, 2009 5:40 am

Don't worry bought a new Kingston 16Gb stick.

Still I wonder what happened....
User avatar
bwjpg
Level 2
Level 2
 
Posts: 51
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Postby chakraps on Fri Jul 17, 2009 1:55 pm

Just wanted to record my tryst with a similar issue. 2GB Kingston flash drive was working good under both Linuxmint 7 and winxp. All of a sudden the mounted drive started being a Read only file system under mint. Under winxp it was still good and could do all file operations. A look at /var/log/syslog showed a bunch of these warnings,
Code: Select all
 [ 1667.282361] FAT: Filesystem panic (dev sdc1)
 [ 1667.282367]     fat_get_cluster: invalid cluster chain (i_pos 0)
 [ 1667.282844] FAT: Filesystem panic (dev sdc1)
 [ 1667.282850]     fat_get_cluster: invalid cluster chain (i_pos 0)
A google search revealed this helpful post by subwaycookie towards the end of this thread http://www.linuxquestions.org/questions ... ly-166190/

[EDIT] I backed up the flash drive contents under windows. booted into mint. stuck in the usb flash drive. right click on the drive icon and unmount volume. then ran following command from terminal, (don't forget to unmount the drive)
Code: Select all
sudo fsck -r /dev/sdc1

fsck complained about a directory that was a complete mess in terms of file clustering. I allowed fsck to get rid of the directory (remember all contents are already backed up in windows). Once fsck completed it's check the USB flash drive was back to normal. Now it's works fine under both mint and windows.
Last edited by chakraps on Fri Jul 17, 2009 2:50 pm, edited 1 time in total.
chakraps
Level 1
Level 1
 
Posts: 23
Joined: Sat Jun 06, 2009 4:22 pm

Re: USB flash drive permissions seem to be mashed

Postby bwjpg on Fri Jul 17, 2009 2:21 pm

Tried it and fsck said

user / $ sudo fsck -r /dev/sdb
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
fsck.ext2: Read-only file system while trying to open /dev/sdb
Disk write-protected; use the -n option to do a read-only
check of the device.

ho hum...

How do I unwrite protect it or failing that do a hard format?
User avatar
bwjpg
Level 2
Level 2
 
Posts: 51
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Postby chakraps on Fri Jul 17, 2009 2:53 pm

oops! forgot to add that the flash drive should be unmounted before running fsck. sorry, important step, edited the previous post. try and let us know.
chakraps
Level 1
Level 1
 
Posts: 23
Joined: Sat Jun 06, 2009 4:22 pm

Re: USB flash drive permissions seem to be mashed

Postby bwjpg on Sat Jul 18, 2009 8:01 am

Okay unmounted flash drive first then got

user - $ sudo fsck -r /dev/sdb
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
fsck.ext2: Read-only file system while trying to open /dev/sdb
Disk write-protected; use the -n option to do a read-only
check of the device.

Mmm...
User avatar
bwjpg
Level 2
Level 2
 
Posts: 51
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Postby chakraps on Mon Jul 20, 2009 11:02 am

Could you try GParted again after unmounting the flash drive. I think the ring of keys is an indicator for mounted partitions and a lot of operations including formatting are restricted on mounted file system.
chakraps
Level 1
Level 1
 
Posts: 23
Joined: Sat Jun 06, 2009 4:22 pm

Re: USB flash drive permissions seem to be mashed

Postby bwjpg on Mon Jul 20, 2009 1:00 pm

You were right about the bunch of keys.

Once I had unmounted the drive they vanished from GParted and all looked fine.

It let me format the drive

But

there was an error

GParted 0.3.8

Libparted 1.8.9

Format /dev/sdb1 as fat32 00:00:03 ( ERROR )

calibrate /dev/sdb1 00:00:00 ( SUCCESS )

path: /dev/sdb1
start: 32
end: 7823359
size: 7823328 (3.73 GiB)
set partitiontype on /dev/sdb1 00:00:03 ( ERROR )
libparted messages ( INFO )

Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.
Can't write to /dev/sdb, because it is opened read-only.
Unable to open /dev/sdb read-write (Read-only file system). /dev/sdb has been opened read-only.

========================================

Still just says that the drive is read only.

Don't sweat it I'm happy with my new Kingston stick.

The purpose of this post is to help anyone else who is facing a similar problem.

Of course it would be nice if there was a solution...
User avatar
bwjpg
Level 2
Level 2
 
Posts: 51
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: lalalatrees, michaeldjcox and 18 guests