Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm creating a symbolic link with the following applescript:

on run
    do shell script "rm /usr/bin/ant" with administrator privileges
    do shell script "ln -s /Users/hordine/software/apache-ant-1.8.2/bin/ant /usr/bin/ant" with administrator privileges
end run

The symbolic link is created but when I try to execute ant -version from a terminal window, I get a permission denied error.

How can I create this link so that I DO have permission to execute it later?

share|improve this question
    
Which access permissions are set for /Users/hordine/software/apache-ant-1.8.2/bin/ant? –  patrix Jun 16 '13 at 14:04

1 Answer 1

up vote 1 down vote accepted

Do a chmod on the symlink to give you the rights.

do shell script "chmod 755 /usr/bin/ant" with administrator privileges
share|improve this answer
    
Thanks, it works. –  Henrique Ordine Jun 16 '13 at 14:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.