You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "John B. Moore" <jb...@esonicspider.com> on 2008/12/22 07:55:01 UTC

Permission Denied - Attachments

I've installed an open source DMS (Document Management System) called 
Xinco that uses Axis between the server and a Java WebStart application.

OS: CentOS 4.7
Tomcat 5.5.23

It uses Attachments when uploading larger files.

I'm getting the error listed below

I'm trying to understand where Axis is try to write this temp file. I've 
look through the source at the method flushtoDisk() This is where the 
error is triggered, but it is not clear at this point where this 
directory is trying to be created.

I had assumed, wrongly it was trying to write to the tomcat/temp 
directory, but that does not seem to be the case..

Can anyone point in the right direction...

Thank you

John..




====================== Error =====================
AxisFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
  faultSubcode:
  faultString: java.io.IOException: Permission denied
  faultActor:
  faultNode:
  faultDetail:
	{http://xml.apache.org/axis/}stackTrace:java.io.IOException: Permission 
denied
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.checkAndCreate(File.java:1704)
	at java.io.File.createTempFile(File.java:1793)
	at 
org.apache.axis.attachments.ManagedMemoryDataSource.flushToDisk(ManagedMemoryDataSource.java:386)
	at 
org.apache.axis.attachments.ManagedMemoryDataSource.write(ManagedMemoryDataSource.java:276)
	at 
org.apache.axis.attachments.ManagedMemoryDataSource.&lt;init&gt;(ManagedMemoryDataSource.java:149)
	at 
org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:557)
	at 
org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
	at 
org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
	at 
org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
	at 
org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:550)
	at org.apache.axis.Message.getAttachments(Message.java:689)

RE: Permission Denied - Attachments

Posted by Martin Gainty <mg...@hotmail.com>.
grant TC access to all files in that folder so for example in $TOMCAT_HOME/conf/catalina.policy

// These permissions apply to all files in ${tomcat.home}/ temp/- folder
grant codeBase "file:${tomcat.home}/temp/-" {
        permission java.security.AllPermission;
};

HTH
Martin
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Mon, 22 Dec 2008 08:57:19 -0800
> From: jbm@esonicspider.com
> To: axis-user@ws.apache.org
> Subject: Re: Permission Denied - Attachments
> 
> It seems to boil down to where the property
> 
> attachments.Directory
> 
> ..is set..
> 
> So far I can't find that "place" or any documentation of where that 
> might be set/defined/etc..
> 
> Any pointers will be very much appreciated..
> 
> John..

_________________________________________________________________
It’s the same Hotmail®. If by “same” you mean up to 70% faster.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008

RE: Permission Denied - Attachments

Posted by Raghu Upadhyayula <ru...@responsys.com>.
John,

	Which version of Axis are you using?

Thanks
Raghu

-----Original Message-----
From: John B. Moore [mailto:jbm@esonicspider.com] 
Sent: Monday, December 22, 2008 10:57 AM
To: axis-user@ws.apache.org
Subject: Re: Permission Denied - Attachments

It seems to boil down to where the property

attachments.Directory

..is set..

So far I can't find that "place" or any documentation of where that 
might be set/defined/etc..

Any pointers will be very much appreciated..

John..

Re: Permission Denied - Attachments

Posted by "John B. Moore" <jb...@esonicspider.com>.
Raghu Upadhyayula wrote:
> Hi John,
> 
> 	I'm not sure what path axis sees as its root directory, in my
> previous project I've given a full path like /usr/local/temp/attachments
> and I suggest to do the same thing ...

Perfect, that is what I needed to know..

Thank you!

John...



> 
> Thanks
> Raghu
> 
> -----Original Message-----
> From: John B. Moore [mailto:jbm@esonicspider.com] 
> Sent: Monday, December 22, 2008 1:20 PM
> To: axis-user@ws.apache.org
> Subject: Re: Permission Denied - Attachments
> 
> Raghu Upadhyayula wrote:
>> John,
>>
>> 	From the name of the property (attachments.Directory) it looks
>> like you are using Axis 1.x (either 1.3 or 1.4).  In that case this
>> property will be in the server-config.wsdd file.
> 
> 
> Ah, thanks, found it...
> 
> Next question..  The property is:
> 
>   <parameter name="attachments.Directory" value="./attachments"/>
> 
> So what does Axis see as its root directory so that I can create that 
> folder,  OR is it best just to put a hard coded path like
> 
> /usr/local/tomcat/temp
> 
> ??
> 
> (Remember this is Tomcat 5.5.x on CentOS 4.7)
> 
> Thanks..
> 
> John..
> 
> 
> 
>> Thanks
>> Raghu
>>
>> -----Original Message-----
>> From: John B. Moore [mailto:jbm@esonicspider.com] 
>> Sent: Monday, December 22, 2008 10:57 AM
>> To: axis-user@ws.apache.org
>> Subject: Re: Permission Denied - Attachments
>>
>> It seems to boil down to where the property
>>
>> attachments.Directory
>>
>> ..is set..
>>
>> So far I can't find that "place" or any documentation of where that 
>> might be set/defined/etc..
>>
>> Any pointers will be very much appreciated..
>>
>> John..
>>
>>
> 
> 
> 


RE: Permission Denied - Attachments

Posted by Raghu Upadhyayula <ru...@responsys.com>.
Hi John,

	I'm not sure what path axis sees as its root directory, in my
previous project I've given a full path like /usr/local/temp/attachments
and I suggest to do the same thing ...

Thanks
Raghu

-----Original Message-----
From: John B. Moore [mailto:jbm@esonicspider.com] 
Sent: Monday, December 22, 2008 1:20 PM
To: axis-user@ws.apache.org
Subject: Re: Permission Denied - Attachments

Raghu Upadhyayula wrote:
> John,
> 
> 	From the name of the property (attachments.Directory) it looks
> like you are using Axis 1.x (either 1.3 or 1.4).  In that case this
> property will be in the server-config.wsdd file.


Ah, thanks, found it...

Next question..  The property is:

  <parameter name="attachments.Directory" value="./attachments"/>

So what does Axis see as its root directory so that I can create that 
folder,  OR is it best just to put a hard coded path like

/usr/local/tomcat/temp

??

(Remember this is Tomcat 5.5.x on CentOS 4.7)

Thanks..

John..



> 
> Thanks
> Raghu
> 
> -----Original Message-----
> From: John B. Moore [mailto:jbm@esonicspider.com] 
> Sent: Monday, December 22, 2008 10:57 AM
> To: axis-user@ws.apache.org
> Subject: Re: Permission Denied - Attachments
> 
> It seems to boil down to where the property
> 
> attachments.Directory
> 
> ..is set..
> 
> So far I can't find that "place" or any documentation of where that 
> might be set/defined/etc..
> 
> Any pointers will be very much appreciated..
> 
> John..
> 
> 


Re: Permission Denied - Attachments

Posted by "John B. Moore" <jb...@esonicspider.com>.
Raghu Upadhyayula wrote:
> John,
> 
> 	From the name of the property (attachments.Directory) it looks
> like you are using Axis 1.x (either 1.3 or 1.4).  In that case this
> property will be in the server-config.wsdd file.


Ah, thanks, found it...

Next question..  The property is:

  <parameter name="attachments.Directory" value="./attachments"/>

So what does Axis see as its root directory so that I can create that 
folder,  OR is it best just to put a hard coded path like

/usr/local/tomcat/temp

??

(Remember this is Tomcat 5.5.x on CentOS 4.7)

Thanks..

John..



> 
> Thanks
> Raghu
> 
> -----Original Message-----
> From: John B. Moore [mailto:jbm@esonicspider.com] 
> Sent: Monday, December 22, 2008 10:57 AM
> To: axis-user@ws.apache.org
> Subject: Re: Permission Denied - Attachments
> 
> It seems to boil down to where the property
> 
> attachments.Directory
> 
> ..is set..
> 
> So far I can't find that "place" or any documentation of where that 
> might be set/defined/etc..
> 
> Any pointers will be very much appreciated..
> 
> John..
> 
> 


RE: Permission Denied - Attachments

Posted by Raghu Upadhyayula <ru...@responsys.com>.
John,

	From the name of the property (attachments.Directory) it looks
like you are using Axis 1.x (either 1.3 or 1.4).  In that case this
property will be in the server-config.wsdd file.

Thanks
Raghu

-----Original Message-----
From: John B. Moore [mailto:jbm@esonicspider.com] 
Sent: Monday, December 22, 2008 10:57 AM
To: axis-user@ws.apache.org
Subject: Re: Permission Denied - Attachments

It seems to boil down to where the property

attachments.Directory

..is set..

So far I can't find that "place" or any documentation of where that 
might be set/defined/etc..

Any pointers will be very much appreciated..

John..

Re: Permission Denied - Attachments

Posted by "John B. Moore" <jb...@esonicspider.com>.
It seems to boil down to where the property

attachments.Directory

..is set..

So far I can't find that "place" or any documentation of where that 
might be set/defined/etc..

Any pointers will be very much appreciated..

John..