Note: please copy replies to: mailto:[EMAIL PROTECTED]
as I don't normally read this list.
Dear Ant-Gurus,
Are there problems with the ant builtin task 'chmod' under Solaris?
It fails when I try to use it.
As shown below when I try to build the target 'bozo' I get a warning
from chmod. My intrepretation of the verbose output is that it is not
passing the file name to the chmod command that is to be executed.
Here's what I've tried/confirmed:
- The target directory /tmp/a exists and I own it (e.g. I
have permissions to perform the operation I defined).
- I've fixed the antRun script to remove the ^m characters
at the end of each line.
- I like Unix and open source, so it _should_ work for me :)
Thanks in advance,
Alan
P.S. Here is the transcript of what I have tried:
$ uname -a
SunOS zus06a-1001 5.8 Generic sun4u sparc SUNW,Ultra-4
$ more build.xml # Show the task for target 'bozo'
...
<target name="bozo">
<chmod file="/tmp/a" perm="go+w"/>
</target>
...
$ ls -ld /tmp/a # Show the target to perform the chmod on
dr-x------ 2 eindhara develop 117 Jul 6 15:22 /tmp/a
$ ant -verbose bozo # Demonstrate the problem
Ant version 1.3 compiled on March 2 2001 <--- Is it recent enough?
Buildfile: build.xml
Detected Java Version: 1.3
Detected OS: SunOS
parsing buildfile /app/eindhara/alan/work/servlet/build.xml with URI =
file:/app/eindhara/alan/work/servlet/build.xml
Project base dir set to: /app/eindhara/alan/work/servlet
Build sequence for target `bozo' is [bozo]
Complete build sequence is [bozo, app.env, variables, prepare, javadoc, clean,
compile, dist, all]
bozo:
[chmod] Myos = SunOS
[chmod] chmod go+w <--- HUH?!? where is the file name?
[chmod] Executing chmod go+w
[chmod] usage: chmod [-fR] <absolute-mode> file ...
[chmod] chmod [-fR] <symbolic-mode-list> file ...
[chmod] where <symbolic-mode-list> is a comma-separated list of
[chmod] [ugoa]{+|-|=}[rwxXlstugo]
[chmod] Result: 2
--- Note that the 'usage' output shown above is consistent with what you
--- get when you enter the command 'chmod go+w' (missing the file name)
--- directly on the command line. This makes me suspect that the problem
--- is with the class/method that sets up the command line (and not the
--- exec part).
BUILD SUCCESSFUL <--- This is also lame... chmod failed!
Total time: 1 second
$ ls -ld /tmp/a # Show the target has no change in permissions
dr-x------ 2 eindhara develop 117 Jul 6 15:22 /tmp/a
$ mailx -s'Problems with ant/chmod under Solaris' [EMAIL PROTECTED]
...Grr!...
^D
--end--
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender. You must not, directly or indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks. Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state
them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is
indicative only, is subject to change and does not constitute an offer to
deal at any price quoted.
Any reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.