Author |
Message
|
Ramphart |
Posted: Tue Mar 08, 2011 12:57 am Post subject: FileInput Node - WMB7 - Permissions Issue |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
WebSphere Broker v7002, Windows Server 2008 R2 Standard
An application dumps read only files into a windows directory and we are using the FileInput node to read the contents of the files and then archive the processed files. Because the files a read only the broker throws the following error:
Code: |
The FileInput node failed to open the file. Either the file no longer exists, or the file cannot be opened with both read and write permissions. The file input node needs read permission to access the contents of the file. The node needs write permission to move, rename, or delete the file after processing the file contents |
It obviously fails because the broker userID needs write permission to move the file.
Can anyone suggest a way that we can work around this from either within the broker / esql or alternately somehow automatically ensure that the file is not read only in this particular directory even though the sending application writes the file as read only?
Any suggestions are much appreciated _________________ Applications Architect |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 08, 2011 2:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Well, by the time you would have gotten to the ESQL, it's too late.
And if the broker user doesn't have write permissions, it almost certainly doesn't have permissions to change permissions.
Fix the sending application as follows: Fix it to write the file to a name that is NOT the final actual name(including extension), and then the last thing it does is a rename. And fix it to write the file without read-only permissions. |
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 08, 2011 3:06 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Set the directory permissions appropriately using the set groupid bit.
and/or
Set the permissions in the sending FTP command stream (site chmod after the put)
and/or
Set the UMASK for the FTP userid.
All very Unixy so don't ask me for exact details - consult someone likely to be found under a stone...  |
|
Back to top |
|
 |
Ramphart |
Posted: Tue Mar 08, 2011 3:31 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
mqjeff wrote: |
Fix the sending application as follows: Fix it to write the file to a name that is NOT the final actual name(including extension), and then the last thing it does is a rename. And fix it to write the file without read-only permissions. |
The sending Application does need to be fixed, it's part of the the way it should work. We are sending documents over AS2 and a confirmation message is sent back to our server upon successful delivery. The confirmation message is deliberatly set to read only because it should not really be changed by the receiving app.
And we do not want to change the file in the broker, merely needs to read the file. But because the only options on the FileInput node is to move or delete the file after reading it, the write access required becomes a problem.
Any suggestions? _________________ Applications Architect |
|
Back to top |
|
 |
Ramphart |
Posted: Tue Mar 08, 2011 3:33 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
zpat wrote: |
Set the directory permissions appropriately using the set groupid bit.
and/or
Set the permissions in the sending FTP command stream (site chmod after the put)
and/or
Set the UMASK for the FTP userid.
All very Unixy so don't ask me for exact details - consult someone likely to be found under a stone...  |
Hi,
The platform is windows and the files are not FTP'd to our server. It's an automatic delivery response message file over the AS2 protocol.
Any other suggestions will be appreciated. _________________ Applications Architect |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 08, 2011 3:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you are doing AS2, you should be looking at something that is specifically designed to handle AS2, like WebSphere Partner Gateway (I think).
You otherwise appear to have a good understanding of your problem, and the limits of the FileInput node.
FileInput node is NOT intended, in current implementations, to serve as an endpoint for high-volume and complex file transfer scenarios. It is intended to provide an input point for Broker to receive data from internal file systems that are relatively well behaved.
Things like MQ FTE and Sterling Connect and Partner Gateway and other such are better suited for complex partner communications |
|
Back to top |
|
 |
Ramphart |
Posted: Tue Mar 08, 2011 4:26 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
mqjeff wrote: |
If you are doing AS2, you should be looking at something that is specifically designed to handle AS2, like WebSphere Partner Gateway (I think).
|
The scenario is not complex at all from the point where the broker gets involved. Just a simple read only file on the file system on the same server as the broker which needs to be read. As you pointed out, it comes down to a limitation then on the File Input node. _________________ Applications Architect |
|
Back to top |
|
 |
Esa |
Posted: Tue Mar 08, 2011 4:41 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Ramphart wrote: |
mqjeff wrote: |
If you are doing AS2, you should be looking at something that is specifically designed to handle AS2, like WebSphere Partner Gateway (I think).
|
The scenario is not complex at all from the point where the broker gets involved. Just a simple read only file on the file system on the same server as the broker which needs to be read. As you pointed out, it comes down to a limitation then on the File Input node. |
I wouldn't call it a limitation but a restriction.
Imagine the fileInput node could really just read the file without deleting or moving it to another directory. It would end up sending the same files over and over again... |
|
Back to top |
|
 |
joebuckeye |
Posted: Tue Mar 08, 2011 7:19 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Quote: |
Just a simple read only file on the file system on the same server as the broker which needs to be read. |
So how does any process, be it the broker or a Java app, read this read-only file and then know that it doesn't need to read it again?
Is the problem that the file needs to stay read-only or that you don't want to move the file out of the initial input directory? |
|
Back to top |
|
 |
|