views:

120

answers:

2

Hellos good fellas! now i'm desparate. I feel like i'm turning round. when i believe solve something then i break something else. started using this mac this week.In the process of setting up my environment i face some challenge.I got a maven project which uses cargo plugin to publish to tomcat working fine.for that i had to google to create the /etc/launchd.conf file.For some reasons web applications created in netbeans cannot publish to tomcat server i thought it was due to tomcat permission but when i set chmod 777 /Library/tomcat020

sh-3.2# ls -l /Library/tomcat6020
total 136
-rw-r--r--@ 1 highjo admin 6148 Nov 4 16:03 .DS_Store i have this for file
drwxr-xr-x@ 26 highjo admin 884 Nov 4 16:03 bin and this for folder

i was expecting to be rwxrwxrwx.that's the first problem. second the first project in maven that was working is not any more. showing

org.apache.maven.surefire.booter.SurefireExecutionException: Unable to create file for report: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied); nested exception is java.io.FileNotFoundException: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied); nested exception is org.apache.maven.surefire.report.ReporterException: Unable to create file for report: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied); nested exception is java.io.FileNotFoundException: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied)

same Exception and permission denied anytime i need to run a web app which is supposed to be published on tomcat. Is Netbeans lacking privileges to access those files?I 'm running late to set up the developement environment.I need help! thanks for reading this

A: 

You say chmod 777 /Library/tomcat020, but then ls /Library/tomcat6020 ( note extra 6 )

Alexander Pogrebnyak
thanks but that was when i was typing here
black sensei
+1  A: 

As for the chmod, you seem to be expecting recursive behavior (since you're looking at the permissions what's IN the directory that you chmod, rather than the directory itself). In that case, you should be using chmod -R.

nojo
thanks it solved the problem! should it be the case? i'm not supposed to grant access to every body.Is there any user or group with which applications on mac os x runs? i'ld like to understand why it's doing that.thanks
black sensei
So the chmod -R just makes it so that the directory and all of the files and directories in it (and all of the files and directories in those, etc) get the change in permission, too. You had changed permissions on tomcat020 to 777, but not for the files in it.The 777 is what makes it so everybody can access it.That said, you're probably better off figuring out some finer-grained permissions rather than leaving everything open. My guess is that you want just the webapps/ directory. Unfortunately, I don't know what user that would be running as, so I don't know what permissions to use.
nojo