linux - Copy to restricted folder with Ant (using Eclipse in Ubuntu) -
using eclipse in ubuntu linux.
i'm creating ant task delete directory in apache localhost directory (/var/www) , copy in files eclipse project.
i have:
<project> <target name="deploy"> <delete dir="/var/www/gds"/> <copy todir="/var/www/gds/src"> <fileset dir="src"> </fileset> </copy> <copy todir="/var/www/gds/"> <fileset dir="web"> </fileset> </copy> </target> </project>
however ant doesn't appear have root user privileges copy directory. works if open eclipse using 'sudo eclipse' don't want running eclipse in root.
is there way can ant copy directory?
you create entry user run eclipse in /etc/sudoers file (using visudo or sudo permissions editor of choice) allow ant run root without password. need eclipse invoke "sudo ant" instead of "ant" - i'm not familiar eclipse maybe else can suggest if that's possible or not. failing wrap ant binary in shell script invokes sudo ant, , tell eclipse that ant binary instead.
Comments
Post a Comment