Solved

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

Posted on 2010-08-17
14
2,277 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
ID: 33452357
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
ID: 33452459
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
ID: 33452478
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:gaby12
ID: 33452581
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
ID: 33452614
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
ID: 33452617
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
ID: 33452630
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
 
LVL 5

Expert Comment

by:danubian
ID: 33452642
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
ID: 33452652
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
ID: 33452658
Hi danubian, I allready did that !!!
0
 
LVL 41

Expert Comment

by:pcelba
ID: 33455084
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
ID: 33456190
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
ID: 33458108
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
ID: 33464549
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
One of the biggest threats facing all high-value targets are APT's.  These threats include sophisticated tactics that "often starts with mapping human organization and collecting intelligence on employees, who are nowadays a weaker link than network…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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