NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

Cant Delete Certain .exe files (Antivirus picking them up as adware)

STILLWATER_LICENSING
4,936 Views

Hi,

 

I am cleaning out a users folder on our netapp share, and I ran into about 5 .exe files that I can not delete and any attempt to delete them pops up alerts from Sophos about them being Adware. I have tried everything I can think of to delete them.

 

Remove them via admin powershell session with -force

Third party programs with that forcibly delete items

Sophos doesnt give an option to delete

Cant rename them (says I dont have permissions)

Owner tab is not available so I cant try to take ownership of the files

 

What else can I do here? Is there a way to force delete them from Netapp CLI? All attemps I have tried give me a permissions error.

 

Thanks for the help!

 

1 ACCEPTED SOLUTION

OhmR
4,862 Views

You should be able to delete the files in Storage CLI 

 

Are you running in C mode or 7 mode ? 

 

7 mode 

 

1) Swith to diag mode 

filer2> priv set diag

Warning: These diagnostic commands are for use by NetApp
personnel only.

2) list the files in the volume using ls command . You need to give the complete path /vol/dir1/dir2/dir3/dir4/dir5/...

filer2>ls /vol/vol_test/
.
..
test3.txt
test.exe
test2.txt
filer2>

3)Remove the file by using rm commnad 

filer2*> ls /vol/vol_test/
.
..
test3.txt
test.txt
123.exe
test2.txt
filer2*> rm /vol/vol_test/123.exe
filer2*> ls /vol/vol_test/
.
..
test3.txt
test.txt
test2.txt
filer2*> priv set

filer2>

 

For C mode 

You need to run the same node level commands in the node where the volume is created

 

 

 

View solution in original post

3 REPLIES 3

OhmR
4,863 Views

You should be able to delete the files in Storage CLI 

 

Are you running in C mode or 7 mode ? 

 

7 mode 

 

1) Swith to diag mode 

filer2> priv set diag

Warning: These diagnostic commands are for use by NetApp
personnel only.

2) list the files in the volume using ls command . You need to give the complete path /vol/dir1/dir2/dir3/dir4/dir5/...

filer2>ls /vol/vol_test/
.
..
test3.txt
test.exe
test2.txt
filer2>

3)Remove the file by using rm commnad 

filer2*> ls /vol/vol_test/
.
..
test3.txt
test.txt
123.exe
test2.txt
filer2*> rm /vol/vol_test/123.exe
filer2*> ls /vol/vol_test/
.
..
test3.txt
test.txt
test2.txt
filer2*> priv set

filer2>

 

For C mode 

You need to run the same node level commands in the node where the volume is created

 

 

 

STILLWATER_LICENSING
4,849 Views

That did the trick, only modification I had to make was there where spaces in the file names, so I hade to add "" around the entire directory path.

 

For future reference, is there a way to delete an entire directory rather than individual files with the rm command?

 

Thanks for the help!

OhmR
4,826 Views

I am glad that helped you. 

 

I don't see an option to delete the Directory in the NetApp CLI. 

 

If I have to do that, I will create a temp NFS exports and delete the directory in UNIX client.

 

 

Public