Frequent access privileges error when trying to duplicate an alias file

I am trying to create a set of applescripts to manage a symbolic link that points to an application's database folder. (aside: The application is not bright enough to let us select one of several databases, but a symbolic link named what the application is expecting works just fine - and was the solution suggested by the apps author.)
So I need to have a symbolic link named "app DB" in my Application Support folder. I have two symbolic links that point to the two database folders I use - one link named "app DB CD" and the other "app DB DVD" but their names don't matter. To switch which database I use with the application, I quit it, discard the "app DB" symbolic link, copy one of the other symbolic links into Application Support, change its name to "app DB" and fire up the application again. Works just fine, but I'd like to make all that an AppleScript, or at least two AppleScripts - one to swap in each database I use.
I tried to have ScriptEditor record my actions in the Finder but it did not record any of what I did except the renaming of the file. Unix's capability to copy a file and rename it at the same time would be perfect here but I don't have the Unix chops to try it yet.
I assembled a simple pair of AppleScripts that worked perfectly about a half dozen times. I was so delighted that I had gotten it to work that I just kept switching the symbolic link back & forth and launching the application for several minutes.
Sadly, like a kid playing with a toy too much it then just stopped working.
Now most of the time (but not all of the time) when the AppleScript tries to duplicate one of the symbolic links I get the following error:
"AppleScript Error
Finder got an error: The operation could not be completed because you do not have enough access privileges."
The first time I got this I checked the privileges for the files and folders. I had "read and write" for every one. On a lark I made the Group that bore my name "read and write" instead of just "read only". The AppleScript worked again - once. Then I got the same error over and over again. I went back and added "read and write" for Others (I know - not a good thing to do) and it worked again - once.
In the past day, the AppleScripts have again worked a couple of times along with 20 or 30 failures. I have not been changing the AppleScripts or the symbolic link files during this time. Through testing, it appears to throw this error at the command "duplicate" or "move":
duplicate alias file "Application Support:DB bits:app db CD"
I have found that if I try to use as a troubleshooting tool the AppleScript:
set foobar to (choose file)
and try to select the symbolic link file, it is not selectable - it is greyed out in the file list.
If I try:
set foobar to (choose folder)
I can choose the symbolic link file, but if I try to do anything with it like duplicate it, it duplicates the folder not the symbolic link file - as expected if I had thought about it.
Can anyone suggest how to reliably duplicate an alias/symbolic link file in MacOS 10.3.9? Should I instead be trying to write a Unix script and call it from AppleScript?
This is the first time in over five years that I have tried to use AppleScript, so please keep any explanations at a neophyte level. grn
G5 2x2 Mac OS X (10.3.9)

It's difficult to pinpoint your issue without actually seeing the code you've put together. Instead I wrote a script that sets up a situation roughly similar to yours, and then debugged that. What I found is that there are a lot of ways to do this wrong, and only one way to do it right. I could get shell scripts to work half the time, but then they stopped working altogether and I couldn't figure out why. So finally I thought it'd be best to delete the alias and tell Finder to make a fresh alias in its place as necessary.
The following demo script will work as-is with no configuration or set up. I'm hoping that you can read through the code, figure out how it works, then apply the knowledge to your script. If you need help, feel free to post your code for suggestions.
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">set test_A to "Folder A"
set test_B to "Folder B"
set the_alias to "The Alias"
set test_folder to "Alias Test Folder"
set my_desk to path to desktop folder as alias
tell application "Finder"
-- part 1: set up the test folder on the desktop
if folder test_folder of my_desk exists then
set test_folder to folder test_folder of my_desk
else -- create the folder
set test_folder to make new folder at my_desk with properties {name:test_folder}
end if
-- part 2: set up the test folders inside the test folder
if folder test_A of test_folder exists then
set folder_A to folder test_A of test_folder
set folder_B to folder test_B of test_folder
else -- create the folders
set folder_A to make new folder at test_folder with properties {name:test_A}
set folder_B to make new folder at test_folder with properties {name:test_B}
end if
-- part 3: set up the alias inside the test folder
if alias file the_alias of test_folder exists then
set the_alias to alias file the_alias of test_folder
else -- create the alias
set the_alias to make new alias file at test_folder to folder_A with properties {name:"The Alias"}
end if
-- part 4: choose where to link The Alias
set linked to ""
repeat
set msg to "Select a new destination for The Alias:"
if linked is not "" then set msg to "The Alias now links to " & linked & return & return & msg
tell me to set toggle to button returned of (display dialog msg buttons {"Quit", "Folder A", "Folder B"})
if toggle is "Folder A" then
set linked to test_A
delete the_alias
set the_alias to make new alias file at test_folder to folder_A with properties {name:"The Alias"}
else if toggle is "Folder B" then
set linked to test_B
delete the_alias
set the_alias to make new alias file at test_folder to folder_B with properties {name:"The Alias"}
else if toggle is "Quit" then
exit repeat
end if
end repeat
end tell
</pre>

Similar Messages

  • I get the following error when trying to open a pdf file... '*pdf.part could not be saved, because the source file could not be read"

    I get the following error when trying to open a pdf file... '*pdf.part could not be saved, because the source file could not be read". I am able to open pdf files in IE and other programs.

    I am encountering the same problem -- though with .qfx files from my bank. This worked fine in Firefox 31 ESR, but since upgrading to Firefox 33.0, I get the "<name>.qfx.part could not be saved, because the source file could not be read" when I attempt to download. (I should add that downloading PDF statements from the same site works fine, and that the qfx downloads work fine in IE and Chrome.)
    I tried safe mode, it is still broken. Tried v34 beta, no luck. I reverted to version 31, it works again.
    I guess I will stick with the older version until a solution is found...or just use an alternate browser to download my financial data.

  • Access Denied error when trying to print over the network

    I just upgraded my Internet service and leased a new modem. My laptop is connected to the network and is able to browse the Internet. I have file and printer shared tuned on on both the desktop and the laptop. The printer is listed on my laptop, but I cannot print over the network to my HP PSC 1401 All In One. I get an Access Denied error even though the printer should still be connected to the network.

    bump

  • I get an error when trying to open certain PDF files in Lion on Mac.

    I am having trouble opening CERTAIN .PDF files on my MacBook Pro. I am running Lion. The file is attached to a Gmail message as a standard .PDF file.
    This is my error:
    "File "XX" cannot be opened. It may be damaged or use a file format Preview does not recognize."
    I have also downloaded Adobe X reader to see if the compatibility issue is just with Preview. I get an error that the file is "damaged" and cannot be recovered. Meanwhile, the file downloads/opens just fine on Windows XP Office and iOS (on my iPad). So I am thinking that it must be some sort of compatibility issue with Lion.
    So far, other .PDF files open on my MB Pro. I haven't tried all of my saved .PDF files, but I did try a couple.
    Anybody have any suggestions? There seems to be an error with this particular file opening in Lion, but not with the same file opening on another operating system.

    The issue mysteriously resolved itself. I shut down the computer, and the next day I booted back up and tried to open the same file, and everything was OK. Very bizarre, since I had opened it previously on this same MacBook. Anyway, anyone have any insight into what happened?

  • DS 4.1 SP02 : Error when trying to import XML/XSD-Files

    Hello,
    i want to import a lot of XML-files with Data Services. I have a XSD file with the XML schema. I've validated the schema against the XML files with XML spy, xmllint and the result is ok. Only Data Services will run on error when i run the job:
    (14.1) 06-20-14 09:34:00 (E) (8948:10636) XML-240108: |Data flow DF_Load_easybank|Reader READ MESSAGE easybank_XML_Input OUTPUT(easybank_XML_Input1)
    An element named <DeviceCashInventory> present in the XML data input does not exist in the XML format used to set up this XML
    source in data flow <DF_Load_easybank>. Validate your XML data.
    (14.1) 06-20-14 09:34:00 (E) (8948:10636) XML-240307: |Data flow DF_Load_easybank|Reader READ MESSAGE easybank_XML_Input OUTPUT(easybank_XML_Input1)
    XML parser failed: See previously displayed error message.
    (14.1) 06-20-14 09:34:10 (E) (11260:10904) XML-240307: |Data flow DF_Load_easybank|Reader READ MESSAGE easybank_XML_Input OUTPUT(easybank_XML_Input1)
    XML parser failed: See previously displayed error message.
    In Data Service Designer i get the following error, when i try to spy into the data source with the spy-glass:
    XML parser failed: See previously displayed error message.
    Can anybody help me ? Many thanks in advance.
    Greeting Peter & George

    Hi there
    I'd be totally surprised if this were to work. This may sound strange from the standpoint that Captivate offers a XML import option. But I believe this option is intended for importing an XML file back into Captivate that was first exported OUT of this captivate project.
    XML export creates an XML file in a specific format. I think the name is XLIFF and it's intended to facilitate localizing your project into assorted languages.
    Hopefully this helps... Rick
    Click here for Adobe Certified Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Internal Server Error  when trying to upload and manage files

    The instructor was experiencing this difficulty on Tuesday 1/13, after the notice was closed. I just
    went into their site again(1/14/09 2:48pm), launched iTunes U and received the same error after clicking on 'Upload And Manage Files' in their iTunes U page.
    I was able to reproduce the same error on our iTunes U site.
    https://deimos.apple.com/WebObjects/Core.woa/EditFiles/indiana.edu

    I have only found two that work correctly. They were created the same way and permissions are the same. I don't know why one works over the other.
    /Indiana University/Project Sites/Oncourse Team - FAIL
    /Indiana University/Project Sites/SyllabusTest - Success
    /Indiana University/Project Sites/CHEN-TES 101 01 - FAIL
    /Indiana University/Project Sites/UITS Podcast Team - FAIL
    /Indiana University/Project Sites/ePortfolio Playgroun - FAIL
    /Indiana University/Project Sites/Testong - FAIL
    /Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14431 - FAIL
    /Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14431 - FAIL
    /Indiana University/SP08 Spring Semester/SP08 OC DEV C201 DEV2 - FAIL
    /Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14438 - FAIL
    /Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14552 - success
    /Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14392 - FAIL

  • TS3212 Insufficient privileges error when trying to install itunes in Windows 7

    I'm trying to install itunes on a machine with windows 7 and keep getting the error that installer has insufficient privileges to access this directory c:\programdata\microsoft\windows\startmenue\programs\itunes.  I am logged in as an administrator.  Does anyone know how to fix this.  Thanks,

    After searching through this forrow i found this
    http://support.microsoft.com/kb/946414
    After running the Fix-It, i had no problem installing iTunes

  • Access Denied Error when trying to do a Search

    Hi,
    We are using the BP for CRM 5.0 and we are facing that the iviews are working but when we go into ie. a new Service Order and in one field we click on the icon to do a search of the value to fill in the text field, we are getting this error:
    Access denied (Object(s): portal_content/com.sap.pct/specialist/com.sap.pct.crm/com.sap.pct.crm.roles/com.sap.pct.crm.core.defaultservices/com.sap.pct.crm.core.valuehelp).
    Exception id: 09:51_13/09/07_0001_3889050
    See the details for the exception ID in the log file
    When we add Administrator permisions to the user this is resolved but the consern is why other iviews of the BP are working but the portal_content/com.sap.pct/specialist/com.sap.pct.crm/com.sap.pct.crm.roles/com.sap.pct.crm.core.defaultservices/com.sap.pct.crm.core.valuehelp is not working with the user profile?
    has somebody suffered this?
    I was trying to go into the log to find the error ID but can´t find the log that has to be analized, I didn´t find a log that has that ID or some ID´s like that one, can somebody guide me into this one to?
    Thanx In Advanced!!
    Kind Regards!
    Gerardo J

    Hi Ahmet,
    The issue was solved assigning permissions to the Role CRM Default Services, try giving Read permisions to your users on this role, I did this assigning the Role where my users are to have permisions into CRM Default Services.
    I hope this can help!!
    Kind Regards,
    Gerardo J

  • Access denied Error when trying to run Tomcat that came with JWSDP

    Hi fellows,
    I went through the forums and found same error posted by someone but no soultion to that.
    So hope this time i get lucky.
    I am running this on win 98(it really sucks)
    After I try to run the startup.bat i get the error:
    Using CATALINA_BASE: C:\JWSDP-1_0-EA2
    Using CATALINA_HOME: C:\JWSDP-1_0-EA2
    Using CATALINA_TMPDIR: C:\JWSDP-1_0-EA2\temp
    Using JAVA_HOME: C:\JDK13~1.1_0
    Access is denied.
    I don't know where to put the build.properties. Any helpful comment will be greately appreciated.
    Regards,

    Folks
    Obviously the EA(Early Access) is just that! I've managed to get around the problem, and run a sample (ConverterBean) using JWSDP with Tomcat on Win98. Here's the workaround:
    1> In the startup.bat, replace "start" with "run". Type "startup" from cmd line. This will start Tomcat in the same window.
    2> Create the build.properties file in the same location as build.xml. For the Getting Started example, this will be in <jwsdp-home>\docs\tutorial\example\gs.
    3> Once you build the sample files, copy the classes directory and index.jsp to <jwsdp-home>\webapps\ROOT\WEB-INF
    4> Update setclasspath.bat in <jwsdp-home>\bin directory to include <jwsdp-home>\webapps\ROOT\WEB-INF\classes.
    5> In the browser, type http://localhost:8080/index.jsp
    BINGO!!!!
    Cheers!
    Pravin
    I hava the same problem
    Using CATALINA_BASE: C:\JWSDP-~1
    Using CATALINA_HOME: C:\JWSDP-~1
    Using CATALINA_TMPDIR: C:\JWSDP-~1\temp
    Using JAVA_HOME: C:\J2SDK_FORTE\JDK1.4.0
    Zugriff wurde verweigert. (access is denied)

  • Win 7 PC wireless network "ACCESS DENIED" error when trying to save a scan from MX450 printer

    Problem solved (by Canon Support).
    thanks all.
    Bye
    Chris

    Hi cherft,
    Glad to hear that you resolve this issue. Could you Please share the solutions with us?
    It will be very beneficial for other community members who have similar questions.
    Thank.
    Yolanda Zhu
    TechNet Community Support

  • WrongName error when trying to run a package file

    Hi, I am trying to run a file in a package. The package name is called com.davidflanagan.examples.net and the file name is ProxyServer.class. I've set the class path to point to the directory the package is in using the CLASSPATH environment variable. I've tried using "java ProxyServer" and "java com.davidflanagan.examples.net.ProxyServer", but I get a cryptic Wrong name error in both Windows and Linux. Any help would be greatly appreciated.

    First, ProxyServer's source code must start with the line...
    package com.davidflanagan.examples.net;
    Next, you must have a directory structure that matches the package name - a directory named com which contains a directory named davidflanagan which contains a directory named examples which contains a directory named net and ProxyServer.class must be in the net directory,.
    Next, the directory that contains com must be in your Classpath when you execute ProxyServer.
    To execute ProxyServer, use "java com.davidflanagan.examples.net.ProxyServer"
    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

  • Itunes tells me there is an error when trying to back up my files

    I am trying to update my iphone 4 to the new iOS 5 system. When it starts to back up my files, it stops after a few minutes and tells me there is an error, and if i continue i will lose everything. i always hit cancel because i don't want to lose my stuff currently on my iphone. what should i do? if i hit continue, can i sync everything again to my itunes library on my macbook? will i lose all of my contacts?

    Take a look at this: http://support.apple.com/kb/HT1808

  • Intermittent Error 41106 Error when trying to open an Excel file.

    I am having an intermittent problem while opening an Excel file.  The problem only occurs occasionally during execution of my program.  My program has a cluster of buttons each button opens a sub VI that is part of a calibration process.  The first VI generates an EXCEL filename that is used to save all calibration data.  A template is opened, data is placed in this template, and then it is saved under the generated filename.  Most of the time this seems to work fine, but every once in a while I receive a -41106 error indicating that Microsoft EXCEL did not open.  As far as I can tell when I run each sub VI independently they work fine and no errors are generated.  Does anyone know why this might be happening?  I would appreciate any help.
    Thanks 

    What version of LabVIEW and the Report Generation Toolkit are you using?  I remember adding some code in the 1.1 version of the toolkit to attempt to avoid some Microsoft Excel latencies with opening/closing the application repeatedly, but it was by no means fool proof, since Excel sometimes takes its sweet time leaving memory when the application exits.  Without knowing any more specifics, my best suggestion is for you to add a small delay between successive operations regarding opening/closing Excel and see if that helps.  Also, if you could post a simple VI that demonstrates the behavior, that would be extra helpful.
    Oh yeah, and another suggestion would be to open one report reference at the beginning of your program, and use this reference through the whole thing...I understand that this might not be possible, though, if you're opening different worksheets throughout the course of your application running.
    Good luck,
    -D
    P.S. - For those of you reading this wondering why I would automatically assume MegaMan is using the Report Generation Toolkit, he cites error -41106, which is an error specific to this toolkit.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • "E_GOOGLE_DEVICE_LIMIT_REACHED" error when trying to open an .acsm file inside Adobe Digital Editions

    Good evening,
    I get the above error message inside ADOBE DIGITAL EDITIONS. I did the following before getting this error:
    a) bought three books from Google Play
    b) Downloaded the three .acsm files reffering to the books from the google play online page and added them to library(in Adobe Digital Editions-ADE for abreviation from now on), without using any authorization.
    c)the books opened successfully and with no problem.
    d)I decided to make Adobe ID. After I made it I made authorization inside ADE and erased in the path ''C:\Users\SEA\Documents\My Digital Editions'' the three pdf files reffering to the books witch where downloaded after completing the steps b and c.
    e) this was where the problem began... from there on I wasn't able to redownload the books again inside ADE so I can read them without using the browser and when I try to reopen the .acsm files(for downloading the books and making them accessible inside ADE) I get the error message ''Error getting license.License server communication problem: E_GOOGLE_DEVICE_LIMIT_REACHED'' .
    Does anyone have any idea on how to solve this problem?

    Puede que encuentres la respuesta aquí:
    http://forums.adobe.com/community/download_install_setup

  • Error when trying to sign a .apk file

    I am having a problem with signing my unsigned .apk file.
    When ever I try to enter this command "`jarsigner –verbose –sigalg MD5withRSA –digestalg SHA1 –keystore my-release-key.keystore AmazonInAppSample-release-unsigned.apk alias_name`"
    I get this error:
    jarsigner error: java.lang.RuntimeException: keystore load: /Users/user7259/.keystore (No such file or directory)
    I executed this command with my current directory being the bin folder where my keystore and .apk file are found.
    I also made sure I entered the correct password.
    If I try to enter a blank pass i get this message:
    jarsigner: you must enter key password
    If I try to enter a correct or invalid password, I get this message:
    jarsigner error: java.lang.RuntimeException: keystore load: /Users/user7259/.keystore (No such file or directory)
    Update:
    Do I need Java JDK 7 installed to use the –sigalg MD5withRSA –digestalg SHA1 ?

    In computer search. You can also press windows key + R and paste there.

Maybe you are looking for

  • Hardware requirement for master collection cs5

    hi guys, just a newbie here. i'm a web/flash game-animation hobbyist, just  thought to take the notch next level by adding production softwares of adobe by taking in mc cs5. I got a few questions before buying this monster suite. my machine is a lapt

  • Change Purchase Requisition

    I'm trying to change the Purchase Requisition data, so, as a first test, I'm trying to invoke the change method but actually not changing a thing. I'm getting an error '80040e21' when I call the BapiChange. Does anybody knows what might be the proble

  • I am going to commit suicide if i can't solve this!

    i have a wsdl. but when i try to generate the stubs for it , i will get an invalid entity:Vector(in namespace"http://xml.apache.org/xml-soap") error. What could the problem be? can you send me a config file that solves this problem at [email protected]

  • Uninstall Sun Java System Messaging Server

    Hi, I need Uninstall Sun Java System Messaging Server, but I not find a command to uninstall. Where is it? Any documentation? Thanks

  • Problem with iPad's after updating to 8.0.2 (12A405)

    After updating to 8.0.2 my iPad2 and iPad Air searching and do not log on to the telephone network. After reboot iPad log on to network until they disconects. Best... Jack