Linux USB flash drive becomes read-only

Source: Internet
Author: User
Tags system log

Today, using Ubuntu to copy data to the classmate, suddenly one of the folder disk can not be copied and deleted. Then Windows7 can delete the other than the modified folder data, but the modified folder is not deleted, the read-only property will not go away. Then Ubuntu directly under the crazy force, any file can not be manipulated. Before also encountered this situation, I was the solution is to format the U disk, but love toss how can I once again let this finally appear bug?

Baidu's, easy to fix!

Preparation for operation The first step is to find the place where your USB stick is mounted, generally under/media/user name/xxxx, you can use the tail command to view the system log to find the location and partition name where the USB stick is hung.

Open a terminal input command, Note that this time do not plug the USB flash drive :

Tail-f/var/log/syslog

Do not close the terminal, insert your USB flash drive, this time your operation will be recorded in the system log, print to the terminal, my is the following look:

can see my USB key name is:teclast coolflashu disk capacity is:32GB partition is:/dev/sdc1  Mount location is:/media/lennon/4502-0001

This information is useful for partitioning and mounting locations.

The next thing to do is to execute two more commands:

Umount Mount Location

umount/media/lennon/4502-0001

The path here is modified according to the actual situation

Then execute DOSFSCK auto Repair USB Drive

sudo dosfsck-v-A/DEV/SDC1

The path here is modified according to the actual situation

It is said that the chkdsk h:/F can also be run in a Windows environment where H is a drive letter. But I haven't had time to try it, so it's been repaired. If you find this way, you can tell me.

No accident, so it has been repaired successfully.

Reference article:

Http://www.2cto.com/os/201410/345804.html

Linux USB flash drive becomes read-only

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.