Discussion Locked

File and folder locks

0 helpful
22 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an NT4 server which will not allow me to delete some folders. This is what I have done to date:
1. Reboot owners machine to make sure it has released all locks.
2. Take ownership of the effected folder and remove all access except Administrators.
To delete the folder I have to reboot the server which is done as little as possible.
The folder is not listed as IN USE nor does it appear that any programs are accessing it, so I have 2 questions.
1. Do you know of any way to list which users or applications have placed a lock on the folder in question?
2. Is there an application which will unlock and delete the affected folder.

Thanks for any help.

22 replies

by frobo

Hi,

this could happen if some Services has deep look in that folder. Stop Services and delete the folder , this seems not to be an NTFS ACL problem. Trying to solve it by reboot doesn't work here, try this:
You don't need (for deleting that folder)this services: Server Service
Workstation Service (all depending services are stopped too)
protected storage
Stop some of the Hardware vendors special Agents too: like Insight Agents from Compaq
And last but not least the SNMP service.

After this you get a real harmfull Machine,
and with that you can delte many things!

regards

Frobo

by cdhjr1

Thanks for the comment, Stopping services will help but this is a production class server so it needs to be up and running 24x7. I know that stopping the services will unlock the folder, what I need is someway to unlock it while the server is running.

by qsr

Particulary look after each file's ownership and add (domain)admin-rights.

by cdhjr1

Domain admins are the owners and the only group w/permissions to the folder

by qsr

Again:

Don't look after the folder, look to each file/data seperately. Are there Domain-Admins listed?

by cdhjr1

All data has been removed from the folder. The folder is the only thing that remains. I have checked for hidden files from Explorer and a command prompt (CMD).
All normal user permissions have been removed from the folder, Domain Admins are the only group and they have Full Control. Domain Admins have Ownership of the folder as well.

by qsr

And you'd restart your system after doing that? - sorry, I need to ask that

by cdhjr1

No problem, Ask what ever you need to!

I have rebooted the person who last used the folder AND my workstation. Rebooting the server solves the problem but I cant reboot the server everytime someone cant delete a folder (and it happens once or twice a month). I suspect the antivirus software but need to prove it. It could be any number of services that run on that box. I'm hopeing to find a way to see what thread is still attached to that folder.
Thanks!

by qsr

Ok, that's what I assumed.
We had the same problem - rebooting the server, as you said, solved the problem. We are also running a anti-virus-application.
But we do not have problems with rebooting the server from time to time. Therefore, it isn't a acutely problem.

by cdhjr1

Thanks for the suggestions! If you come across anything please let me know.

by frobo

Hi,

good to know that you tought of it. Normaly you don't have to stop the Serverservice or Workstationservice. In that case you must dig and look w?ch Service or a part of it (DLL) has the lock on the Folder or files. Take Heapspy or equivalentTool and look what is causing the filelock.
Tip: try the protectedstorage Service first, and special Agentservices from the HW-Vendor.

regards

Frobo

by frobo

Another thing, if you have an share on that folder, then it could cause such problems too.

by shanghai sam

Thank you for the suggestion, I have downloaded Heapspy and the extra DLL files needed. Heapspy shows what is loaded in memmory but cant really narrow it down to what is attached to each folder.
Please let me know if you can think of any other applications.

Thanks for the input!

by ghummel

Try using file manager, yes, file manager (winfile). Highlight the file in question, select file, properties, open by. Does file manager show the file open? You will see an option to force the file closed.

by cdhjr1

Thanks for the reply.
I tried this but it did not work. The get information only works on files. All of the files inside the folder are gone. I even opened a command prompt and checked with ATTRIB and DIR. Both said the folder was empty.

by maxwell edison

A simple way might be to try deleting them from a DOS command prompt.

Open a DOS window.

Go to the directory where the folder is located.

Command: RD FolderName

Note: You may have to use ~ if folder name is longer than 8 characters. And the files from the folder must first be deleted.

Maxwell

by gigelul

Maybe Net Watch from resource kit can give you an different overview for that folder.

This discussion is closed to new replies.