cannot delete any files from virus affected pendrive in ubuntu fat 16 filesystem

Asked by kevinbheda

when i insert it it automatically mounts but in read only mode so i cannot delete virus like autorun.inf an all
so i did
"sudo mount -t vfat /dev/sdb1 /home/kevin/usb -o rw"
and then
"chown -R kevin:kevin usb "
 bu then also i coudnt delte it plz help

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
kevinbheda
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

If the pendrive was dirty unmounted read only mode is the default access mode

My suggestion create a local folder and copy and paste the pendrive content then

install gparted package and crete partition and format it

then copy the data back to that pen from local directory

optionally you can install clamav in your Ubuntu system and you can scan the local directory dir to find viruses

Revision history for this message
kevinbheda (kevinbheda) said :
#2

no its i just want to delete the selectedfiles and
i want format the pendrive
plzz tell me sensible answer how to get read andwrite permission on Autorun.inf
i did chmod 777 autorun.inf
 but it gave me error read only filesystem

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

So why not just format it using gparted

Revision history for this message
kevinbheda (kevinbheda) said :
#4

nopes i cant my data is important
some folders its not showing me if it was showing all te folders then i could do tht option
but there must be a slution to make rw the autorun.inf file

Revision history for this message
mycae (mycae) said :
#5

kevin, you have to pass the "user" option to mount if you wish to allow users to be able to write to the filesystem. The rw is for the owner of the mounted system, ie root.

Revision history for this message
kevinbheda (kevinbheda) said :
#6

 i did it uuid an all i copy pasted it from net
i also did changes in fstab but files inside
all varying rw options
like .exe file had only read permissions
Autorun.inf also had read permission only
the folder in which it is mounted the pendrive has read write permissions but
when i did chmod 777 autorun.inf
is showed me autorun.inf is read only filesystem
but my normal pic s i couldeasily delete it

Revision history for this message
mycae (mycae) said :
#7

Sorry, I don't understand your message. Is your problem solved?

Revision history for this message
kevinbheda (kevinbheda) said :
#8

oi formatted it last option availabe ltome