f



File share/network access problem

At least I think it's a file share issue... not sure. I have a program
that creates a PDF document on a V7R1 system using CPYSPLF. If I write
the document to folder "GOOD" in the IFS, I can open it just fine from
a Windows 7 PC. If I write the document to folder "BAD" then it does
not open and I get the message "network access is denied". Both
folders have the same share permissions when viewed from System i
Navigator. 

If I copy the file from the working folder "GOOD" to folder "BAD", it
opens OK. 
If I then run my program and overwrite the existing file that is now
opening in folder "BAD", it opens the new file OK.
But if I then delete the file from folder "BAD" and re-run the
program, it won't open.

I've been banging my head against a wall for hours on this one now...
anyone have an idea what the problem might be?

TIA
-- 
Scott at Scott dash(-) Coffey dot net
0
Scott
8/18/2016 1:12:32 PM
comp.sys.ibm.as400.misc 9219 articles. 4 followers. Post Follow

3 Replies
601 Views

Similar Articles

[PageSpeed] 15

On Friday, 19 August 2016 01:12:38 UTC+12, Scott Coffey  wrote:
> At least I think it's a file share issue... not sure. I have a program
> that creates a PDF document on a V7R1 system using CPYSPLF. If I write
> the document to folder "GOOD" in the IFS, I can open it just fine from
> a Windows 7 PC. If I write the document to folder "BAD" then it does
> not open and I get the message "network access is denied". Both
> folders have the same share permissions when viewed from System i
> Navigator. 
> 
> If I copy the file from the working folder "GOOD" to folder "BAD", it
> opens OK. 
> If I then run my program and overwrite the existing file that is now
> opening in folder "BAD", it opens the new file OK.
> But if I then delete the file from folder "BAD" and re-run the
> program, it won't open.
> 
> I've been banging my head against a wall for hours on this one now...
> anyone have an idea what the problem might be?
> 
> TIA
> -- 
> Scott at Scott dash(-) Coffey dot net


Have you checked the authorities on the files when created in "GOOD" and "BAD" and compared them?  I suspect they're different.
A good place to look for such access errors is the system audit journals.  These will log an AF entry if there is an autohrity issue on the files (as long as you're logging that sort of thing).
0
jsev99
8/18/2016 8:58:29 PM
On Thu, 18 Aug 2016 13:58:29 -0700 (PDT), jsev99@yahoo.co.nz wrote:

>On Friday, 19 August 2016 01:12:38 UTC+12, Scott Coffey  wrote:
>> At least I think it's a file share issue... not sure. I have a program
>> that creates a PDF document on a V7R1 system using CPYSPLF. If I write
>> the document to folder "GOOD" in the IFS, I can open it just fine from
>> a Windows 7 PC. If I write the document to folder "BAD" then it does
>> not open and I get the message "network access is denied". Both
>> folders have the same share permissions when viewed from System i
>> Navigator. 
>> 
>> If I copy the file from the working folder "GOOD" to folder "BAD", it
>> opens OK. 
>> If I then run my program and overwrite the existing file that is now
>> opening in folder "BAD", it opens the new file OK.
>> But if I then delete the file from folder "BAD" and re-run the
>> program, it won't open.
>> 
>> I've been banging my head against a wall for hours on this one now...
>> anyone have an idea what the problem might be?
>> 
>> TIA
>> -- 
>> Scott at Scott dash(-) Coffey dot net
>
>
>Have you checked the authorities on the files when created in "GOOD" and "BAD" and compared them?  I suspect they're different.
>A good place to look for such access errors is the system audit journals.  These will log an AF entry if there is an autohrity issue on the files (as long as you're logging that sort of thing).

I used the same CL to create the files... the only thing I changed in
the CL was the directory name, so the permissions/properties are the
same (I did check.)  
-- 
Scott at Scott dash(-) Coffey dot net
0
Scott
8/19/2016 12:22:54 PM
On Thu, 18 Aug 2016 09:12:32 -0400, Scott Coffey
<none@noemail.com.invalid> wrote:

>At least I think it's a file share issue... not sure. I have a program
>that creates a PDF document on a V7R1 system using CPYSPLF. If I write
>the document to folder "GOOD" in the IFS, I can open it just fine from
>a Windows 7 PC. If I write the document to folder "BAD" then it does
>not open and I get the message "network access is denied". Both
>folders have the same share permissions when viewed from System i
>Navigator. 
>
>If I copy the file from the working folder "GOOD" to folder "BAD", it
>opens OK. 
>If I then run my program and overwrite the existing file that is now
>opening in folder "BAD", it opens the new file OK.
>But if I then delete the file from folder "BAD" and re-run the
>program, it won't open.
>
>I've been banging my head against a wall for hours on this one now...
>anyone have an idea what the problem might be?
>
>TIA


OK, found the answer.  The share properties of the folder were set to
do automatic text conversion to ascii for ALL files (.*).  Don't know
why this triggered a "network access denied" instead of "unreadable
file" or some other useful message, but anyway... problem solved.
-- 
Scott at Scott dash(-) Coffey dot net
0
Scott
8/19/2016 2:55:33 PM
Reply: