• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Deployed Applications can't access file system
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deployed Applications can't access file system


  • Subject: Re: Deployed Applications can't access file system
  • From: Louis Demers <email@hidden>
  • Date: Fri, 16 Jan 2009 15:33:49 -0500

Thanks a million.

The first component of the path was under different "groupship"... Added appserver to that group and it now works. The other restriction you mentioned are perfectly fine by me.

Thanks again.



On 16-Jan-09, at 14:43 , Chuck Hill wrote:


On Jan 16, 2009, at 11:31 AM, Louis Demers wrote:

Hi,
my webobjects/wonder app needs to access/create files/directories in a directory of the server where it runs. When I debug in eclipse the application on my powerbook it works correctly but once installed on the server I get the message below. I assume that the applications runs as _appserver so, In Workgroup Manager, I added this user to the group who has access to this directory. but still does not works.


Any advice ? Is there any special procedures in Java or WebObjects to access files ?

No, you just have a permissions problem that you are not seeing. Follow the path down from / using these commands:
http://www.gvcsitemaker.com/gvc.webobjects/faq&mode=single&recordID=37272


If it is a mounted volume on another machine, you can be in for extra fun.

Also be aware that anything you _create_ will not be group or world writable. Only _appserver will have write access. So if you are sharing this with other applications and users that can be a problem. The only solution for Java 5 is to use ERXFileUtilities.chmod() on the file / directory after you create it. There is also ERXFileUtilities.chmodRecusively


Chuck



Jan 16 14:08:32 Obzerv[2001] DEBUG com.obzerv.eo.Spec - making directories /Obzerv/Spec & Parts/ASM/ASM-0117/Spec/Dot/
java.io.FileNotFoundException: /Obzerv/Spec & Parts/DotPreamble (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileReader.<init>(FileReader.java:55)
at com.obzerv.Obzerv.getContents(Obzerv.java:82)
at com.obzerv.eo.Spec.createDotFiles(Spec.java:189)
at com .obzerv.component.SpecHierarchy.appendToResponse(SpecHierarchy.java: 38)
at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java: 1381)
at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java: 536)
at com .webobjects .appserver.WOApplication.appendToResponse(WOApplication.java:1785)
at er .extensions .appserver.ERXApplication.appendToResponse(ERXApplication.java:1546)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:242)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369)
at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:442)
at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1678)
at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1646)
at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1610)
at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:613)


Jan 16 14:05:02 Obzerv[2001] ERROR com.obzerv.eo.Spec - Error: dot: can't open /Obzerv/Spec & Parts/ASM/ASM-0117/Spec/Dot/ ASM-0117.BH.dot
Jan 16 14:05:02 Obzerv[2001] ERROR com.obzerv.eo.Spec - Error: dot: can't open /Obzerv/Spec & Parts/ASM/ASM-0117/Spec/Dot/ ASM-0117.BH.dot
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:850)
at com.obzerv.Obzerv.setContents(Obzerv.java:128)
at com.obzerv.eo.Spec.createDotFiles(Spec.java:212)
at com .obzerv.component.SpecHierarchy.appendToResponse(SpecHierarchy.java: 38)
at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java: 1381)
at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java: 536)
at com .webobjects .appserver.WOApplication.appendToResponse(WOApplication.java:1785)
at er .extensions .appserver.ERXApplication.appendToResponse(ERXApplication.java:1546)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:242)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369)
at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:442)
at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1678)
at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1646)
at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1610)
at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:613)
Jan 16 14:05:02 Obzerv[2001] ERROR com.obzerv.eo.Spec - Error: dot: can't open /Obzerv/Spec & Parts/ASM/ASM-0117/Spec/Dot/ ASM-0117.HH.dot
Jan 16 14:05:02 Obzerv[2001] ERROR com.obzerv.eo.Spec - Error: dot: can't open /Obzerv/Spec & Parts/ASM/ASM-0117/Spec/Dot/ ASM-0117.HH.dot



PS: I know there are spaces in the name but these are escaped and work properly when executed locally on my portable.
PPS: I'm new to this part of Java io...



Louis Demers eng. www.obzerv.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

Louis Demers eng. www.obzerv.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Deployed Applications can't access file system (From: Louis Demers <email@hidden>)
 >Re: Deployed Applications can't access file system (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: [OT - kinda] WOWODC 2009 webcasting?
  • Next by Date: Re: [OT - kinda] WOWODC 2009 webcasting?
  • Previous by thread: Re: Deployed Applications can't access file system
  • Next by thread: Re: Deployed Applications can't access file system
  • Index(es):
    • Date
    • Thread