Suddenly all of my contents residing on external hard disk has changed to read-only mode. Even though I am using Linux, I don't know how a virus have done this. I tried using "chmod", but still I am not able to change permission. So Now I can only read and copy files in/out it. But I cant delete anything.Please suggest me some way.

  • What filesystem are you using on external hard disk? Also, attaching the output of mount command when hard disk is in use can help. Commented Sep 28, 2012 at 10:27

5 Answers 5


Try usind super user to change permissions

sudo chmod -R 755 /media/ExternalDrive

This will recursively (therefor the "-R") set 755 permissions fo the specified path. If you want full permisisons set to 777


Hard to know your situation with so few details. Are you root? If not, do you have root access? When you tried CHMOD, did you get an error?

Try CHMOD -R 755 /path/to/external/drive

if that doesn't work, try sudo CHMOD -R 755 /path/to/external/drive


You need to run chmod from an account that does have permission to make these changes; your account might have permission using the sudo command, but if you don't know if it does, it probably doesn't.


It would helpful to know exactly what, if any, error message you see when you try to chmod.

Since this is an external mount, it is possible that it has been mounted read-only. In that case, chmod would return something like "Operation not permitted". Fixing that requires examining your mount tables. If this is a removable drive, it could be something a simple as the write-protect tab being set.

In any case, I advise against doing a chmod -R on the entire drive until you know what is going on, as doing so could mess up permissions on existing files.


Try the following command

sudo chown $USER /media/ExternalDriveName

This will enable you to read and write to the disk. This worked for me after Ubuntu 12.04 mysteriously changed the onwership of my hard drive from myself to "root". Which meant that I had a similar problem as you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .