Solved

'File access is denied' error when working with Kaspersky Pure

Posted on 2010-08-17
14
2,261 Views
Last Modified: 2012-05-10
Hi,
Recently I bought the antivirus software Kaspersky Pure and my applications (VFP 9.0 SP2) begin generating errors 'File access is denied' (refering to DBF files) when in the program there is a code including 'ALTER TABLE ...'.
I moved all the application folder, including database folder in the 'Trusted zone', but nothing happened, and errors still appear.
Please help me.
Gabriela
0
Comment
Question by:gaby12
  • 5
  • 4
  • 2
  • +2
14 Comments
 
LVL 5

Expert Comment

by:danubian
Comment Utility
What operating system do you use ?
If the problem is NTFS permission related, then you should give modify/edit permission on tables folder to the app operators.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
Alter table is generating a new file temporary, kaspersky might scan that. add dbf,cdx,fpt,dbc,dct,dcx to extensions kaspersky shouldn't scan, even in the TEMP dir.

Besides that ALTER TABLE does need exclusive access and therefore is of limited use in a shared database application. You do such things as table changes as maintainance, eg as database update before/when introducing a new version, not in the daily work with a database, uness it's a single user application. But even then: A econdary form wanting to use that table while it's altered can fail.

It might not be related to Kaspersky, but happens more often or at all, because table alterations take longer the more data there is in a dbf of course.

Bye, Olaf.
0
 

Author Comment

by:gaby12
Comment Utility
Hi danubian,
I use Windows XP on one computer and Vista on my laptop. The problem is the same, and generated by the use of the antivirus software Kaspersky Pure (when I close it all problems disappear, as they appeared after instalation of Kaspersky Pure).
0
 

Author Comment

by:gaby12
Comment Utility
Hi Olaf,
I use the 'ALTER TABLE' only on a temporary DBF file, generated by a 'COPY STRUCTURE' command, and used for reports and displaying data. I know for sure that is a Kaspersky problem and I wanted to solve it faster, with your help.
Thank you,
Gabriela
0
 
LVL 2

Expert Comment

by:GreatSolutions
Comment Utility
Had the same problem with kaspersky a long time ago, tried adding .DBF to the list of allowed extensions, didn't help and it was quite a critical application, so never used them again since then.
0
 

Author Comment

by:gaby12
Comment Utility
As I said previously, I put in the 'Trusted zone' the application directory, which include the fact that all files are not scanned (including the database folder, and temporary  folder).
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
Another option would be to

COPY STRUCTURE EXTENDED TO TblStru

update the resulting TblStru.DBF and create new table structure by

CREATE Tbl FROM TblStru

I would also recommend to ask same question in Antivirus software zone.

BTW, I am using AVAST and AVG without problems. (Avast just has higher ratio of false alarms.)
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 5

Expert Comment

by:danubian
Comment Utility
Try adding the app executable to trusted zone>trusted applications with do not scan opened files and do not monitor application activity checked.
0
 

Author Comment

by:gaby12
Comment Utility
Sorry, I already bought the Kaspersky antivirus software, and I think that all peple who bought it finally can use it.
0
 

Author Comment

by:gaby12
Comment Utility
Hi danubian, I allready did that !!!
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
AVG and AVAST was just a note. The work around is more important and antivirus independent solution...
0
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 250 total points
Comment Utility
All I can say about ALTER TABLE is that it creates a temp table and finally deletes the old one and renames the new one. Rather looks like all that is done to the existing file, but behind the scenes two files are involved. Such things of course are suspicous operations to antivirus software.

It's time to call Kaspersky, if you checked the "do not scan opened files and do not monitor application activity checked." option already. Sometimes changes need a restart of the software or a reboot of the system.

Otherwise creating the table with the structure you finally want or working with cursors instead of temp Dbf files would be a solution.

You can use AFIELDS() instead of copy structure, change and extend the resulting array as you like and then CREATE TABLE FROM ARRAY.

Creating a cursor is even less of a hassle: Select table.*, CAST(expression AS fieldtype) as newfield from table into cursor cursorname Readwrite. Can also be as simple as SPACE(30) as newchar20field and afterwards you can fill values into the new field in a secondary scan or update etc. as you do with the temp table via Select cursorname and COPY TO dbfname. It's easy to work with a cursor like you did before with a temp dbf, you can reuse all your code.

If you want to keep a temp table to be able to repeat the last report, simply put that as last, generating files abviously poses less problems as altering them.

Bye, Olaf.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
You say you excluded the temporary folder. That's a folder per user within the user profile. Despite of that it's surely one folder where viruses can prosper, as users have write and execution rights there, so excluding that from antivirus is not a good move. Excluding the file extensions of foxpro data is better.

Bye, Olaf.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
Here's another two voices on Kaspersky:

1. Somehow the watchguard (or whatever that is named in Kaspersky) is involved in creating new files. He opens them exclusive for a short check, probably even despite of excluded directores, which of course is a problem in ALTER TABLE and other scenarios, you can't control that and foxpro fails on that behaviour.

2. Using your own TEMP dir could be a working alternative. Foxpro is using the official TEMP dir you can see with SYS(2023) or GETENV(TEMP).

What you should change is TMPFILES, EDITWORK, PROGWORK, and SORTWORK settings in a Visual FoxPro configuration file (config.fpw). Then foxpro will not use the TEMP folder other applications use, but will use that dir also for ALTER TABLE. So eg create a folder C:\yourapp\temp\ and set foxpro to it and exclude it from Kaspersky.

That would work in regard of opinion/voice 2, but if opinion/voice 1 is correct, Kaspersky doesn't work with foxpro or vice versa.

Bye, Olaf.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now