USB flash drive permissions seem to be mashed

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
bwjpg
Level 2
Level 2
Posts: 52
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

USB flash drive permissions seem to be mashed

Post by bwjpg »

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

http://forums.linuxmint.com/viewtopic.p ... ve#p110531

But that didn't work.

I tried Lolo's quite clever solution from

http://forums.linuxmint.com/viewtopic.p ... ive#p77830

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

I hope I have the luck of Kymac

http://forums.linuxmint.com/viewtopic.p ... ive#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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
bwjpg
Level 2
Level 2
Posts: 52
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Post by bwjpg »

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: 52
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Post by bwjpg »

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

Still I wonder what happened....
chakraps

Re: USB flash drive permissions seem to be mashed

Post by chakraps »

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.
User avatar
bwjpg
Level 2
Level 2
Posts: 52
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Post by bwjpg »

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?
chakraps

Re: USB flash drive permissions seem to be mashed

Post by chakraps »

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.
User avatar
bwjpg
Level 2
Level 2
Posts: 52
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Post by bwjpg »

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...
chakraps

Re: USB flash drive permissions seem to be mashed

Post by chakraps »

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.
User avatar
bwjpg
Level 2
Level 2
Posts: 52
Joined: Fri Mar 16, 2007 5:34 am
Location: Slough, Berkshire, UK

Re: USB flash drive permissions seem to be mashed

Post by bwjpg »

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...
Locked

Return to “Hardware Support”