Change file permission for external drive?
Change file permission for external drive?
I have a USB "stick" I use to move files from machine to machine, which has decided this evening it is "read-only file system".
How can I force this back into a writeable stick?
The locked files are one thing, and curiously they are all .rec files and are like ghosts of files deleted months and months ago.
The real problem is the entire disk is "read-only" so I can look at these strange ghost files (and copy them), but I can't add new files to the stick.
Any help appreciated!
-zami
Re: Change file permission for external drive?
What I've tried so far - all failures
Idea One : fail!
sudo chmod 777 /media/LEXAR
gives
"chmod: changing permissions of `/media/LEXAR': Read-only file system"
Idea Two : fail!
gksudo nautilus LEXAR>properties>permissions tab and settings
gives
"Sorry, could not change the permissions of "LEXAR": Error setting permissions: Read-only file system"
Idea Three : ?
I haven't yet tried "safely remove hardware" via Windows, because I haven't used this disk on a Windows system in a rather long while, and feel I should be able to solve this without borrowing someone else's computer.
Idea Four : fail!
I tried formatting the dang thing via gparted. No go. I can see it, but all I can do is look at it, or unmount it. Argh!
-zami
Re: Change file permission for external drive?
Your USB disk is probably corrupted so it was mounted as read only. You can try to repair using the following steps.
1. With the USB drive mounted, use the command:
to figure out which device it is. (for example, /dev/sdd1 on my computer... it will probably be different on your computer.
2. Unmount the USB device using:
Code:
sudo umount /dev/sdd1
3. Check and repaire the errors on the USB device:
Code:
sudo fsck -r /dev/sdd1
4. Then unplug it and plug it back in and see if it mounts correctly as read/write.
Re: Change file permission for external drive?
Holy smokes! There were just a ton of errors on that thing!
"differences between boot sector and its backup"
"FATs differ but appear to be intact."
lots of "....contains a free cluster....." fragments to delete
Amazing.
It's working perfectly now though. amac777? Thank you so much!!
-zami
Re: Change file permission for external drive?
worked for me as well - thanQ !! :KS
Re: Change file permission for external drive?
Worked for me too - what's the issue with these thumbdrives - is it necessary to manually umount them befor pulling them out?
Re: Change file permission for external drive?
Thanks amac777. You saved the day!
Re: Change file permission for external drive?
I also had a same problem with USB stick, but fsck did not work - because it's not ext2 fs or something... My stick is fat32. Finaly I scaned it with WXP and fixed...
Is it possible to do fsck for fat32 in Ubuntu?
Re: Change file permission for external drive?
Excellent solution - thanks so much. I've been trawling the boards all morning - I should have guessed it was something so simple! I guess it happened when I removed the drive from a windows machine without ejecting properly.
Re: Change file permission for external drive?
Perfect solution. Worked like a charm. Found 600 error on the drive. Last time Im letting windows format a drive for me.