remove write proteced in usb ubuntu

Unmount it, and make it writeable

sudo umount /dev/sdb1
sudo hdparm -r0 /dev/sdb
Create a new mount point and mount it there (my userID from /etc/passwd is 1000)

sudo mkdir /media/andrew/temp
sudo mount -o uid=1000 /dev/sdb1 /media/andrew/temp
it'll still complain that it's read-only. I don't know why I had to change this flag before AND after mounting, but that's the only way it worked for me. Set it to writeable again, and remount it at the same place

sudo hdparm -r0 /dev/sdb1
sudo mount -o remount,rw /dev/sdb1
Now I can write to the disk as my normal user. I'm being very careful with it in case it is actually failing, but those commands allowed me to finish what I was doing.

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source