Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to run a Spring MVC 2.5 tutorial and when I run the ant script for a deploy, I get this error: deploy: [copy] Copying 2 files to C:\apache-tomcat-7.0.8\webapps\c:\projects\workspace\springapp

BUILD FAILED C:\projects\workspace\springapp\build.xml:46: Failed to copy C:\projects\workspace\springapp\war\WEB-INF\web.xml to C:\apache-tomcat-7.0.8\webapps\c:\projects\workspace\springapp\WEB-INF\web.xml due to failed to create the parent directory for C:\apache-tomcat-7.0.8\webapps\c:\projects\workspace\springapp\WEB-INF\web.xml

After reviewing the directory: springapp I saw the properties as read-only. No problem I thought as I'm logging in as administrator. However, changing the uac settings, going to a command prompt as admin and then trying to change the properties of the folder with attrib, making me the owner of the folder, changing the security settings etc... did nothing. I can't seem to change this folder to anything.

So my question is, how do I change the settings on that folder so ANT can make changes to that folder?

share|improve this question

2 Answers 2

Open an elevated command prompt

a. Type the following command and press Enter key:

takeown /f [path to folder] /r /d y

b. To assign the Administrators group Full Control Permissions for the folder, use this command and hit Enter key:

icacls [path to folder] /grant administrators:F /T

The /T parameter is added so that the operation is carried out through all the sub-directories and files within that folder.

share|improve this answer
    
The first command worked, but I'm getting icacis is not recognized as an internal or external command error. –  James Drinkard Sep 17 '12 at 21:18
    
icac_L_s, not icac_I_s. –  Ansgar Wiechers Sep 17 '12 at 22:09
    
Okay, the command ran but still didn't work. I may have a corrupted user profile. –  James Drinkard Sep 18 '12 at 22:44
up vote 0 down vote accepted

I think Moab's answer would have worked normally, but my root problem was a corrupted user profile. So I went and followed the steps from the Microsoft website link and it solved the problem.

I hope this helps someone if they run into this same problem.

share|improve this answer

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.