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.

link|improve this question
feedback

migrated from stackoverflow.com Jan 10 at 22:27

This question came from our site for professional and enthusiast programmers.

4 Answers

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown