ONTAP Discussions
ONTAP Discussions
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!
Solved! See The Solution
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
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
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!
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.