Re: Permissions on ant build products in "dist" directory

From: Chuck Hill (chil..lobal-village.net)
Date: Tue May 13 2008 - 23:06:30 EDT

  • Next message: Art Isbell: "Re: Permissions on ant build products in "dist" directory"

    Hi Art,

    On May 13, 2008, at 7:01 PM, Art Isbell wrote:

    > What controls the permissions of the executables in the ant build
    > products in the project "dist" directory? When I build woa's using
    > ant in Eclipse 3.3.2/WOLips 3.3.5047, the executables have 750
    > permissions which causes them to fail to execute when deployed.
    > This occurs because they're owned by root but run as appserver with
    > no common group membership. I have to remember to change all
    > executables to 755 permissions after JavaMonitor fails to launch
    > them (I rarely remember to do this prior to attempting to launch
    > them).

    I don't know, but this has been a issue for a long, long, long time.
    I think the root problem is that Java has no way to do this. When a
    Java process creates a file, it is created with 750 permissions and
    there is no API (that I know of) to do change this to 755. Java 6 has
    and expanded File API, but not expanded enough. I have been creating
    a lot of files lately and finally resorted to adding a method to shell
    out to chmod. This, of course, works not on Windows but permissions
    on Windows are seldom a problem.

    Now that I have bored you with useless background information, I will
    redeem myself with some actually useful information. I do something a
    bit different, so this is more of a sketch than tested code.

    Look in your build.xml file for the build.woapp target:

    <target name="build.woapp">

    Look at the end of this target for:

                    </woapplication>
            </target>

    Try changing this to;

                    </woapplication>
                    <chmod file="destDir="${dest.dir}${file.separator}$
    {project.name}.woa${file.separator}${project.name}" perm="755"/>
            </target>

    The Ant chmod should be a no-op on Windows. Not that you would care,
    but some folks bend that way.

    Perhaps this should be part of the standard WOLips build.xml file?

    Chuck

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Tue May 13 2008 - 23:07:28 EDT