ACL files, delete

Many Months ago i ran across a reference, some one had a script to delete the ACL files.
Does any one know if the ACL files can still be deleted.
Since that time i have erased and re installed and lost the reference.
Does any one know what i am writing about and have a reference for that script source.
Thank you.

Is this what you are looking for?
====
-- this script fixes situations
-- where a Mac running OS X 10.5
-- suffers heavy CPU load from
-- ASL Manager
-- www.soulman.de
-- copyright Soulman 2009
-- V0.7: a quick and dirty hack
-- 13. April 2009
display dialog "If the process -ASLmanager- takes up to 99% of your CPU, this script will attempt to fix the problem." with icon note
delay 1
set userPassword to askForPassword()
do shell script "mkdir ~/Desktop/oldASLdata"
do shell script "launchctl stop com.apple.syslogd" password userPassword with administrator privileges
do shell script "launchctl stop com.apple.syslogd" password userPassword with administrator privileges
do shell script "launchctl stop com.apple.syslogd" password userPassword with administrator privileges
do shell script "launchctl stop com.apple.aslmanager" password userPassword with administrator privileges
display dialog "Moving Old Data to folder oldASLdata on the desktop." with icon note
do shell script "mv /var/log/asl/* ~/Desktop/oldASLdata/" password userPassword with administrator privileges
do shell script "launchctl start com.apple.syslogd" password userPassword with administrator privileges
display dialog "Done. The Folder ldASLdata on the desktop and its contents may be deleted, if you don't need it anymore. If you don't know what the content is all about, then you don't need it." with icon note
display dialog "While we are at it: Run periodic maintainance skripts?" buttons ¬
{"OK", "No"}
set DlogResult to result
if button returned of result = "OK" then
do shell script "periodic daily weekly monthly" password userPassword with administrator privileges
display dialog "Running periodic maintainance scripts. This may take a while but is done in background." with icon note
display dialog "The Folder ldASLdata on the desktop and its contents may be deleted, if you don't need it anymore. If you don't know what the content is all about, then you don't need it." with icon note
else if button returned of result = "no" then
display dialog "Done. The Folder ldASLdata on the desktop and its contents may be deleted, if you don't need it anymore. If you don't know what the content is all about, then you don't need it." with icon note
end if
delay 1
on askForPassword()
beep
set submitPasswordButton to "OK"
set cancelButton to "Cancel"
set dResult2 to display dialog "Please enter your password." buttons {submitPasswordButton, cancelButton} default button 1 cancel button cancelButton default answer "" with hidden answer
if button returned of dResult2 is submitPasswordButton then
return (text returned of dResult2)
else
tell AppleScript to quit
end if
end askForPassword

Similar Messages

  • Set permissions to prevent file deleting

    So, I have several iMacs that are basically public computers.  They will all access a shared server.  The machines need to possess all of the user permissions of a "read/write" user with the EXCEPTION of being allowed to delete.  As it is now, a random user could delete our entire server in two clicks.  So, I need to somehow secure our data while still allowing the "reading" and "editing" of files.
    •  Somehow disable the delete file function altogether (while still maintaining read/edit permissions)
    •  Find some 3rd party app or workaround that prompts the user with a password dialogue box in order to execute the "delete"
    •  Somehow apply permissions to a specific folder that enables read/edit, but disables file deleting
    Thoughts?

    You should post your question in this forum
    https://discussions.apple.com/community/servers_enterprise_software/os_x_server
    But in a nutshell, using ACL's, you can give people read-write access, but not give them full control (i.e they can't delete.).

  • Trying to delete file from trash but get this: The operation can't be completed because the item "File name" is in use. All other files delete except this one. Please help

    Trying to delete file from trash but get this: The operation can’t be completed because the item “File name” is in use. All other files delete except this one. Please help

    Maybe some help here:
    http://osxdaily.com/2012/07/19/force-empty-trash-in-mac-os-x-when-file-is-locked -or-in-use//

  • HT2674 I have an iMac purchased in May 2011.  OSX Lion 10.7.3.  I deleted backup file from the external hard drive. Now, the trash can will not empty some of the files deleted.  File folder: "Core Services" contains a locked file: "boot.efi".  It will not

    I have an iMac purchased in May 2011.  OSX Lion 10.7.3.  I deleted backup file from the external hard drive which operates from Time Machine.
    Now, the trash can will not empty some of the files deleted from the backup harddrive.
    The trash contains-- File folder: "Core Services" which contains a locked file: "boot.efi". 
    It will not delete.
    How do I get the trash can empty of these files?

    Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
    In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think?

  • File.delete() and File.deleteOnExit() doesn't work consistently..

    I am seeing some odd behavior with trying to delete files that were opened. Usually just doing new File("file.txt").delete() would work. However, in this case, I have created an input stream to the file, read it in, saved it to another location (copied it), and now I am trying to delete it.
    The odd thing is, in my simple application, the user can work with one file at a time, but I move "processed" files to a lower pane in a swing app. When they exit it, it then archives all the files in that lower pane. Usually every file but the last one opened deletes. However, I have seen odd behavior where by some files don't delete, sometimes all of them wont delete. I tried the deleteOnExit() call which to me should be done by the JVM after it has released all objects such that they don't matter and the JVM ignores any object refs and directly makes a call (through JNI perhaps) to the underlying OS to delete the file. This doesn't work either.
    I am at a loss as to why sometimes some files delete, and other times they don't. In my processing code, I always close the input stream and set its variable to null. So I am not sure how it is possible a reference could still be held to the object representing the file on disk.

    and then, in the other class
      public int cdplayerINIToMMCD(File aDatabase, String thePassword) throws IllegalArgumentException {
         /*---------DATA---------*/
         String dbLogin, dbPassword;
         JFileChooser fc;
         INIFileFilter ff;
         int dialogReturnVal;
         String nameChosen;
         File INIFile;
         ProgressMonitor progressMonitor;
         BufferedReader inFileStream;
         String oneLine;
         int totalLines = 0;
         int linesParsed = 0;
         boolean openDBResult;
         int hasPassword;
         if ((aDatabase == null) || (!aDatabase.exists()) ||
            (FileManagement.verifyMMCD(aDatabase) == FileManagement.VERIFY_FAILED)) {
            throw new IllegalArgumentException();       
         else { 
            currentDB = aDatabase;
            if(thePassword == null) {
              dbPassword = "";
            else { dbPassword = thePassword; }
            dbLogin = dbPassword; //For MSAccess dbLogin == dbPassword
         //Ask the user for the cdplayer.ini file.
         //Create a file chooser
         if (System.getProperty("os.name").indexOf("Windows") > -1) {
            fc = new JFileChooser("C:\\Windows");
         else {
            fc = new JFileChooser();     
         fc.setMultiSelectionEnabled(false);
         fc.setDragEnabled(false);
         //Create a new FileFilter
         ff = new INIFileFilter();
         //Add this filter to our File chooser.
         fc.addChoosableFileFilter(ff);
         fc.setFileFilter(ff);
         //Ask the user to locate it.
         do {
            dialogReturnVal = fc.showOpenDialog(mainFrame);
            if (dialogReturnVal == JFileChooser.APPROVE_OPTION) {
               nameChosen = fc.getSelectedFile().getAbsolutePath();
               if(nameChosen.toLowerCase().endsWith(INIFileFilter.FILE_TYPE)) { INIFile=new File(nameChosen); }
               else { INIFile = new File(nameChosen+INIFileFilter.FILE_TYPE); }
               if (!INIFile.exists()) {
                  continue; //If the name specified does not exist, ask again.
               else { break; }
            else { //User clicked cancel in the open dialog.
               //Ignore what we've done so far.
               return(IMPORT_ABORTED);
         } while(true); //Keep asking until cancelled or a valid file is specified.
         //Determine how many lines will be parsed.
         try {
           //Open the INI for counting
           inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
           while ((inFileStream.readLine()) != null) {
               totalLines++;
           //Close the INI file.
           inFileStream.close();
         } catch (IOException ex) { return(IMPORT_FAILED); }
         //Make a progress monitor that will show progress while importing.
         progressMonitor = new ProgressMonitor(mainFrame, "Importing file","", 0, totalLines);
         progressMonitor.setProgress(0);
         progressMonitor.setMillisToPopup(100);
         progressMonitor.setMillisToDecideToPopup(1);
         //Make our DatabaseHandler to insert results to the database.
         dbh = new DatabaseHandler();
         //Open the database connection.
         do {
           try {
              openDBResult = dbh.openDBConnection(currentDB, dbLogin, dbPassword);
           } catch(JDBCException ex) { return(IMPORT_JDBC_ERROR); } //OUCH! can't write anything.
             catch(SQLException ex) {
                 openDBResult = DatabaseHandler.OPNCN_FAILED;
                 //Can not open the database. Is it password protected?
                 hasPassword = JOptionPane.showConfirmDialog(mainFrame, "Could not open the database. "+
                                                "The password is wrong or you have not specified it.\n"+
                           "Do you want to enter one now?", "New password?", JOptionPane.YES_NO_OPTION);
                if (hasPassword == MMCDCatalog.DLG_OPTN_YES) {
                   dbPassword = JOptionPane.showInputDialog(mainFrame, "Please enter your "+
                                                              "password for the DataBase:");
                    dbLogin = dbPassword; //For MSAccess, login == password                                                    
                //If the password wasn't the problem, then we can't help it.
                else { return(IMPORT_FAILED); }
         } while(openDBResult != DatabaseHandler.OPNCN_OK); //If it is OK, no exception thrown.
         //Import the ini file
         try {
            //Open the INI file for parsing.
            inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
            //Read and parse the INI file. Save entries once parsed.
            while ((oneLine = inFileStream.readLine()) != null) {
               parseLine(oneLine);
               linesParsed++;
               progressMonitor.setNote("Entries imported so far: "+entriesImported);
               progressMonitor.setProgress(linesParsed);
               if ((progressMonitor.isCanceled()) || (linesParsed == progressMonitor.getMaximum())) {
                  progressMonitor.close();
                  break;
            //Close the INI file.
            inFileStream.close();
         } catch (IOException ex) {
              //Make absolutely sure the progressMonitor has disappeared
                progressMonitor.close();
                if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.\n"+
                    "Error while attempting to close the database", "Error", JOptionPane.INFORMATION_MESSAGE);
              else {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.",
                                                    "Error", JOptionPane.INFORMATION_MESSAGE);     
                return(IMPORT_FAILED);
         //Make absolutely sure the progressMonitor has disappeared
         progressMonitor.close();
         //Close the database connection
         if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
            JOptionPane.showMessageDialog(mainFrame, "Error while closing the database after import.",
                                          "Error", JOptionPane.INFORMATION_MESSAGE);
         //Did the user cancel?
         if (totalLines != linesParsed) {
            return(IMPORT_ABORTED);     
         //Success!
         //Everything ok. Return the number of entries imported.
         return(entriesImported);
      }

  • File.delete() not working properly

    Hi Forum!!
    I am trying with the below code :
    File file = new file("path");
    try{
    if(file.exists())
    System.+gc+();
    file.delete();
    System.+out+.println("Control in delete trx file after deletion"+ file.exists());
    }catch(SecurityException se){
    String msg= "Delete trx file if 3gttz file created : IO Problems";
    Log.+error+(msg, se);
    }file.exists() returns false But I when I check file, it still exhists with content 0 bytes .
    Is there a way to remove the entire file from the directory rather than deleting only the
    contents ? Need not to tell I did my initial search to solve the problem.
    Thanks
    Edited by: jagabandhu on Feb 10, 2009 1:09 PM

    georgemc wrote:
    PhHein wrote:
    corlettk wrote:
    We can't all be rocket surgeons, either ;-)Heart scientist is the word you're looking for.Or rockin' sturgeons. A (marginally) cooler - albeit fictional - alternative to this abominationFrom a crazy drunk:
    A "bottle in front of me" is better than a "frontal lobotomy"!
    (Sound out those two quoted strings.)

  • Okay, i have 2 bugs with maverick.  First, when I delete a file within a window, the files deletes but the preview doesn't delete until I close the window and reopen it.  Second, I work on a network of computers and the search feature is now buggy...

    Okay, i have 2 bugs with maverick.  First, when I delete a file within a window, the files deletes but the preview doesn't delete until I close the window and reopen it.  Second, I work on a network of computers and the search feature is now buggy...  When I search for a file, A) it asks me if it's a name, or it wont produce anything, and B), its slower than in prior OS versions and in some instances I have to toggle to a different directory and go back to my original directory in the search: menu bar or the search wont produce anything...  Very buggy. 

    It appears to me that network file access is buggy in Maverick.
    In my case I have a USB Drive attached to airport extreme (new model) and when I open folders on that drive they all appear empty. If I right click and I select get info after a few minutes! I get a list of the content.
    It makes impossible navigate a directory tree.
    File access has been trashed in Maverick.
    They have improved (read broken) Finder. I need to manage a way to downgrade to Lion again.

  • How can i use the ACL file to control the access from the other website?

    Hello all~
    My Sun one is 6.1 sp3 on Windows 2003 SE, and I am try to use the ACL file to control the access.
    My ACL file is below:
    version 3.0;
    acl "path=my_path_on_HD";
    deny absolute (all)
    (user = "anyone") and
    (dns = "*.my_site.com");
    deny absolute (all)
    (user = "anyone") and
    (dns = "*.other_site.net");
    Once I add the "deny", anyone include my site is decline for vist the path specify in the ACL file. But if remove the "deny", everyone include other one's website can access the file.
    Can anybody tell me how to make it work?

    I think you've misunderstood what the dns attribute is for. The dns attribute returns the hostname of the client accessing your website, not the hostname of the website that linked to your website.
    For example, when someone using the Comcast ISP goes to a malicious website at example.com that loads images from your website at www.amigoo.net, the dns attribute will be something like "c-1-2-3-4.ca.comcast.net", not "example.com". ACLs are used for authentication and authorization of clients (not the websites those clients chose to visit), and they don't provide the functionality you're looking for.
    If I understand correctly, you want to prevent websites other than amigoo.net from linking to files in your d:/webserver/imat/pics_upload directory. You can achieve this adding the following lines to your obj.conf configuration file:
    <Object ppath="d:/webserver/imat/pics_upload/*">
    <Client referer="*~*amigoo.net">
    PathCheck fn="deny-existence"
    </Client>
    </Object>

  • Java.io.File.delete worked in 1.1, 1.2, 1.3 & 1.4, but not in 5.0

    I have a logging utility I wrote originally in Java 1.0. A nightly housekeeping task runs which creates a ZIP file for the previous days log, then deletes the .log file. If I run this software with Java 5.0, the File.delete fails and the .LOG file remains on the disk. No exceptions are thrown. delete just returns false.
    Any ideas?

    to find a bug this basic! Each day I switch to a new log file, leaving the previous days file. I was never closing the old PrintStream... Jees... How embarrassing.

  • Application server-file delete

    Hi All,
    Is there any options to delete for file in directory in Application server. If there ,please send me flow or logic.

    Hi,
    For deleting a file in the application server user the syntax DELETE DATASET..
    DELETE DATASET '/tmp/test.txt'.
    IF SY-SUBRC <> 0.
      WRITE: / 'Error in deleting'.
    ELSE.
      WRITE; / 'File deleted'.
    ENDIF.
    Thanks,
    Naren

  • Logs for File Deletion?

    I have a situation where I don't want to recover a file... I want to see how it was deleted.
    Is there any way to review file deletions via Apple log files or any other method? My research so far says no... but perhaps someone is craftier than I've proven to be.

    An unfortunate circumstance to be sure. Out of curiosity is there any particular reason you can't use ClamXAV rather than NAV?
    I suppose that if NAV has a log and nothing relevant is in the log, then you're at a loss to even know if NAV is responsible for the folder's mysterious disappearance. Maybe you have technically savvy cockroaches in the building that come out at night to play? An informational age version of Archie and Mehitabel?
    This experience may be an impetus to install software that keeps track of what's installed or removed from a computer. Doesn't help much now but it would be useful in the future.
    Oh, one thing comes to mind - file recovery software:
    Data Rescue II
    File Salvage
    TechTool Pro
    Message was edited by: Kappy

  • How to make JDS confirm file deletion?

    I use the bash shell when logged in over SSH and I always set the following alias just in case I do something stupid:
    alias rm="rm -i"Is there a similar setting for JDS that I can tell it to confirm file delete whenever I try to delete a file (i.e. popup a standard "Are you sure?" dialog box)?
    Thanks!

    By default JDS file browser "deletes" files to the trash can - a la windoze Recycle bin 8-( -
    so it doesn't feel the need to double check as you can always reclaim the file from there.
    Emptying the trash includes an "are you sure" which can be configured from the folders settings pane:
    Launch->Preferences->Desktop Preferences->Folders and pick the "Behaviour" tab
    If you mean you want the double check made in a terminal or console displayed within JDS, as opposed to using the file browser, then you need to place a suitable command in the configuration for the shell you're using e.g. .profile or .cshrc etc.
    Regards,
    Paul

  • File deletion in root and subdirectories.

    Greetings,
    I have a question regarding Batch scripting. I am trying to create a system maintenancing script which removes .TMP and .BAK files from all of my drives both subdirectories and directories above. Let's say the Batch script would be placed into "Folder3"
    in the following internal drive address "C:\Folder1\Folder2\Folder3\Folder4\Folder5". And I want the batch script to remove files from folders 4 and 5 as subdirectories but also to remove files from C: Drive and folders 1, 2, and of course 3 itself
    but without removing folders. And I'd like to apply this method to all drives simultaneously without a human user personally moving the script via cut/copy and pasting from drive to drive. The other alternative which can come into consideration is to create
    a Batch File with any address location on the internal drive and when running this Batch file it'll create additional Batch Files on specified (multiple) drives at the very root of drives in the drive address of C:\ for instance, and initializes the required
    file deletion process. Some of the folders require my Administrator priviliges therefore I'd like to create a code within the script that ask for user permission and says "Yes" but without actually asking from me as the user to click "Ok"
    or "Yes" when running the script itself or to fully bypass the firewall. I have created the other part of the coding for deleting specified superfluous file types and in what way it's just the sub and above-directory part of it that gives me a pause
    to proceed. Any help is greatly welcome or pointers. If my request would seem cluttered please notify me of it and I'll try to simplify it down, although I hope I wasn't too confusing with the elaboration.
    Thank you in advance, even for the consideration.
    Kind Regards.

    @ECHO OFF
    for %%a in (C: D: E: F: G:) do call :Sub %%a
    goto :eof
    :Sub
    echo Processing %1
    del /s /q %1\*.tmp
    del /s /q %1\*.bak

  • Why file.delete() won't work?

    I looked throught the forum and I have seen that my problem isn't the most uncommon one. I'm trying to delete a file using file.delete().But it always return false. I have used the file for reading(and sometimes writing) before but I have closed the stream, I have checked that many time ;).
    This has me a little confused. The file ins't write protected either. Is there perhaps anyway to close all streams assosiated with a certain file?

         try {
                boolean success = (new File(currentFile)).delete();
                if (!success) {
                   statusLabel.setText("Error");
                readPatients();
             catch (SecurityException se) {
                System.out.print(se);
             }Should work, shouldn't it?

  • Operations on file: Deleting and get size

    Hi,
    I'm triying to delete a file. I use the following code:
    File found = new File (directoryOutputFileWriter+f);
                   boolean deleted = found.delete();But when I execute it the boolean deleted it's always false and the file is not deleted.
    Then I try to get the size of another file in this way:
    File produced = new File(directoryOutputFileWriter+file[0]);
    long size = produced.length();but I receive a null value (the file exists and its dimension is over 0 of course).
    Why?
    How can I solve?
    Thanks, bye bye.

    Hello,
    in my experience the absolute #1 source of astonishment with file operations is loose manual checking (mistyping or misreading).
    I suggest you use those traces:
    File found = new File (directoryOutputFileWriter+f);
    System.out.println("File path is"+found.getAbsolutePath());
    System.out.println("Does this file exists? "+found.exists());
    System.out.println("Is this file really a file? "+found.isFile()); // You may not be able to delete a directory on all platforms
    System.out.println("Is this file deleted now? "+found.delete());#2 is developers not reading the javadoc (that states that delete may not succeed), but I acknowledge you have read it, as you're investigating why it hasn't, and not complaining that it has.
    #3 is people overlooking OS-specific file management. E.g. Unix-Linux-Window file permissions management all may let you read a file but not delete it (with the unices having a richer set of combinations than windows). The rules for directory deletion are different between Unices and Windows. Etc...
    Edited by: jduprez on Jul 5, 2010 9:44 AM
    @Mel: I sometimes wish I was that much connected to my wife's mind ;o)
    @Joachim: nice catch! Loose manual checking indeed (both on my part and on OP's)...

Maybe you are looking for

  • Images corrupted in application package.

    Hi All, I am using .png images in my application. After building the application. It creates myfirst.app ... if I right click it in finder and select "Show package Content" .. it shows list of resources. If I try to open the images (.png) ... some of

  • Pi 7.1 ehp1 log-configuration.xml, howto create/edit in NWDS?

    Hello, In NWDS 2.0 You have a special mode in NWDS  to edit the file. You get tabs with Log Formatter, Log Destination, Log Controller and Source. How does it work in NWDS 7.1 EHP1? The log-configuration shipped with the example module is packed insi

  • Unable to save permission changes in templates in win 2012

    Hi, PKI set up of (2003 and 2008) based Sub CA and 2003 based AD ( with schema version supporting 2008) is running in the enviornment. Now CA is migrating to 2012 setup. When i try to create template and make permission changes, it says " unable to s

  • Discrete Manufacturing Scenario

    Hi all, Can I have detailed information on customisation required to be done in discrete manufacturing. Regards,

  • SQL Management Studio 2012

    Created an App-V recipe for SQL Management Studio 2012: http://rorymon.com/blog/index.php/app-v-recipe-sql-management-studio-2012/ PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog: rorymon.com Twitter: @Rorymon