Temp files in my Shared Folders
On my server (SBS2003) i have shared folders. I nonw have them locked down so users cannot move them. However, they can edit and save the files inside the folders. Now though, when they change a file and save it, it creates a.
On my server (SBS2003) i have shared folders. I nonw have them locked down so users cannot move them. However, they can edit and save the files inside the folders.
Now though, when they change a file and save it, it creates a .tmp file as well which we cannot delete.
Anyone heard of this and know why its happening?
Any help would be appreciated.
Andy
Now though, when they change a file and save it, it creates a .tmp file as well which we cannot delete.
Anyone heard of this and know why its happening?
Any help would be appreciated.
Andy
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
Who has ownership of the .tmp files? SYSTEM? How are the NTFS permissions set on those files?
I assume you're using Microsoft Office (version?), since it typically creates ~*.tmp filenames. Check your permissions so that users have rights to delete files in that folder. This is important since the applications are running under the user context, and cannot remove temp files if the user cannot.
And yeah, I know giving users rights to delete files can be an issue...
I assume you're using Microsoft Office (version?), since it typically creates ~*.tmp filenames. Check your permissions so that users have rights to delete files in that folder. This is important since the applications are running under the user context, and cannot remove temp files if the user cannot.
And yeah, I know giving users rights to delete files can be an issue...
i had this problem: we wrote a vb app that did something like:
use .net and use the FileSystemWatcher class.
Monitor the folder(s) and when a tmp file appears try to delete it.
If you get somekind of error (e.g. its in use) then carry on monitoring otherwise delete it.
You therefore end up with only in use files. We then created a separate account soley for this purpose.
Of course this depends upon how worthwhile you think this method is since a batch file will do the same job, just not as frequently. We needed instant deletion so this was handy for us.
Also you need to know the applications very well since deleting files that apps assume are already there can produce some interesting errors! :x
If this way looks viable then check out Visual Systems Journal (VSj) july/august edition 2004 magazine since theres a good article on this class in there.
Anyway enough of my waffling! have fun
----
Scin
use .net and use the FileSystemWatcher class.
Monitor the folder(s) and when a tmp file appears try to delete it.
If you get somekind of error (e.g. its in use) then carry on monitoring otherwise delete it.
You therefore end up with only in use files. We then created a separate account soley for this purpose.
Of course this depends upon how worthwhile you think this method is since a batch file will do the same job, just not as frequently. We needed instant deletion so this was handy for us.
Also you need to know the applications very well since deleting files that apps assume are already there can produce some interesting errors! :x
If this way looks viable then check out Visual Systems Journal (VSj) july/august edition 2004 magazine since theres a good article on this class in there.
Anyway enough of my waffling! have fun
----
Scin
hey alec! notice im back?! lol
hehe so many ways to skin a cat
Our little app is an exe that sits in memory. However it is form based (cos we have constants we can change like where to monitor, monitor 9-5 etc. etc) so it spends its whole life minimised on the taskbar with a little message saying that it is running (so no open systems guys go closing it).
Its launched every morning when the server comes back up - we made it launch as a service just to make things easy.
FileSystemWatcher is great because it is event driven. Therefore we tell it to hook into the Created event. When a tmp file is created it bursts into life and deletes it
However if we meet an 'in use/access denied' error we just loop around until it can be deleted.
Admittidly its probably not the nicest way in this case since the files might be in use for a long time. But then again whats a few processor clicks between friends?!
hehe so many ways to skin a cat
Our little app is an exe that sits in memory. However it is form based (cos we have constants we can change like where to monitor, monitor 9-5 etc. etc) so it spends its whole life minimised on the taskbar with a little message saying that it is running (so no open systems guys go closing it).
Its launched every morning when the server comes back up - we made it launch as a service just to make things easy.
FileSystemWatcher is great because it is event driven. Therefore we tell it to hook into the Created event. When a tmp file is created it bursts into life and deletes it
However if we meet an 'in use/access denied' error we just loop around until it can be deleted.
Admittidly its probably not the nicest way in this case since the files might be in use for a long time. But then again whats a few processor clicks between friends?!
alec u crack me up! hehe
handy programming yes, although i dont do it as a trade as such anymore. i sort of act as a go between- interpreting users requirements into (hopefully) stable, appropriate solutions.
by far the best solution is usually the one you can do in 'as it comes/vanilla' XP/NT/whatever-OS.
I just have the horrible habit of assuming VB is available since im so used to being at my desk.
But top marks to you Mr- WSH comes to the rescue again.
So I think we've covered all angles?! nice
handy programming yes, although i dont do it as a trade as such anymore. i sort of act as a go between- interpreting users requirements into (hopefully) stable, appropriate solutions.
by far the best solution is usually the one you can do in 'as it comes/vanilla' XP/NT/whatever-OS.
I just have the horrible habit of assuming VB is available since im so used to being at my desk.
But top marks to you Mr- WSH comes to the rescue again.
So I think we've covered all angles?! nice