Bug 42511 - FixCrLf task changes file security settings on Windows Vista
Summary: FixCrLf task changes file security settings on Windows Vista
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.7.0
Hardware: All other
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 07:38 UTC by Stefan Wachter
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Wachter 2007-05-24 07:38:14 UTC
I am using Ant inside an installer that runs with administrator privileges on
Windows Vista. The files that are copied into the C:\Programm Files\<myapp>
folder have their security set such that all users can read and execute these files.

The FixCrLf task creates temporary files in the temporary directory of the
current user. Files that are created there can not be read and executed by all
users. Only the current user has "full control".

When the FixCrLf task renames its temporary files in order to replace the
original ones the security settings of the temporary files are kept.

In my example the files under C:\Programm Files\<myapp> that were processed by
the FixCrLf task are no longer readable by all users!

Proposed fix: The temporary file that is used by the FixCrLf task to process a
source file must be created in the directory the original file stays in. By this
means the temporary file gets the same security settings as the source file.
Comment 1 Steve Loughran 2007-05-24 08:11:26 UTC
A few workarounds.
1. use setACL: http://setacl.sourceforge.net/html/doc-basics.html
2. after the fixcrlf, use <copy> to make a copy of the file in the target dir.
that will ensure that no move takes place
3. fixcrlf at build time, and copy out the fixed file on windows systems