Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Script to turn On-Access scanning off/on

Hi folks

Can anyone help me with a script to stop or start the InterCheck process on a Mac?

In short, I'm wanting to script On-Access Scanning to be off at the start of a backup (to improve performance) and restar when the backup finishes.

Thanks in advance

Georgia

:1002115


This thread was automatically locked due to age.
Parents
  • Hi, I also need to temporarily disable on-access scanning while a Mac OS X backup software ( SuperDuper ) runs to clone fthe hard drive because when Sophos detects a virus, it locks access to the file, the backup app retries, then aborts the whole backup. So the backups are not completing.This is terrible. I have to choose between virus protection and backups.

    It is more important to us to have a good backup, than to not backup infected files. I am OK with backing up infected files. We can run an AppleScript before & after the backup, so a good work around seems to be to disabe on-access scanning, run the backup, then re-enable on-access scanning.

    What I need some help with is the correct syntax of the AppleScript or shell script.

    I have so far to enable Sophos On-Access Scanning:

    tell application "Sophos Anti-Virus"
        "On-Access Scanning Component(1)"
    end tell

    This will compile, but doesn't seem to do anything.

    From the AppleScript dictionary of Sophos Anti-Virus for Mac (Home version)

    On-Access Scanning Component n [inh. Component] : The On-Access component of the Sophos Anti-Virus product.
    ELEMENTS
    contains exclusions.
    PROPERTIES
    enabled (boolean) : Whether on-access protection is enabled for this computer. Note: setting this property requires authentication.

    I understand the risks of writing a script that includes authentication to temporality disable the on-access scanning, but the only alternatives are to

        * never back up again, or
        * completely disable Sophos, or
        * only do attended backups, manually.

    None of which are very practical. It seems completely logical to disable on-access scanning while cloning the entire HD, and re-enable on-access scanning when the clone is complete. I can easily manually disable the On-Access scanning before I leave. The Backup script will run just fine, then the backup app can run an applescript to enable Sophos.

    If supported, it would also be acceptable if Sophos could log, but not disable access to an infected file. That would let the backup app continue without frustration. Moving the infected files is not a good idea, especially since all or most are within Apple Mail, and moving those would harm the integrity of the Mail database.

    What is the correct syntax for an AppleScript (or alternate) to enable or disable Sophos On-Access Scanning?

    Thanks,

     Dave Nathanson

     Mac Medix

    :1014065
Reply
  • Hi, I also need to temporarily disable on-access scanning while a Mac OS X backup software ( SuperDuper ) runs to clone fthe hard drive because when Sophos detects a virus, it locks access to the file, the backup app retries, then aborts the whole backup. So the backups are not completing.This is terrible. I have to choose between virus protection and backups.

    It is more important to us to have a good backup, than to not backup infected files. I am OK with backing up infected files. We can run an AppleScript before & after the backup, so a good work around seems to be to disabe on-access scanning, run the backup, then re-enable on-access scanning.

    What I need some help with is the correct syntax of the AppleScript or shell script.

    I have so far to enable Sophos On-Access Scanning:

    tell application "Sophos Anti-Virus"
        "On-Access Scanning Component(1)"
    end tell

    This will compile, but doesn't seem to do anything.

    From the AppleScript dictionary of Sophos Anti-Virus for Mac (Home version)

    On-Access Scanning Component n [inh. Component] : The On-Access component of the Sophos Anti-Virus product.
    ELEMENTS
    contains exclusions.
    PROPERTIES
    enabled (boolean) : Whether on-access protection is enabled for this computer. Note: setting this property requires authentication.

    I understand the risks of writing a script that includes authentication to temporality disable the on-access scanning, but the only alternatives are to

        * never back up again, or
        * completely disable Sophos, or
        * only do attended backups, manually.

    None of which are very practical. It seems completely logical to disable on-access scanning while cloning the entire HD, and re-enable on-access scanning when the clone is complete. I can easily manually disable the On-Access scanning before I leave. The Backup script will run just fine, then the backup app can run an applescript to enable Sophos.

    If supported, it would also be acceptable if Sophos could log, but not disable access to an infected file. That would let the backup app continue without frustration. Moving the infected files is not a good idea, especially since all or most are within Apple Mail, and moving those would harm the integrity of the Mail database.

    What is the correct syntax for an AppleScript (or alternate) to enable or disable Sophos On-Access Scanning?

    Thanks,

     Dave Nathanson

     Mac Medix

    :1014065
Children
No Data