Error 101 unable to open file

I’m trying to create an output file on my domino server. The operating system is Linux-RedHat. The directory exists, but I keep getting the “Error 101 unable to open file”. Is my format incorrect?

Here’s a code snip.

            Dim outfile As String

DDate$=Format(Datevalue(Today),"mmddyy")

TTime$=Format(Timevalue(Now),"hhmmss")

FileName$="FeesExport"+DDate$+TTime$+".csv"

outfile = "/var/notesdata/feesexport/"+FileName$

Open outfile For Output As #1 '**BOMBS HERE**

Thanks and regards.

Subject: Error 101 unable to open file

Also, this is in an agent that will be scheduled to run on the server.

Subject: RE: Error 101 unable to open file

probably the rights’ issue. Does the account server gets started from can create a file there?

Subject: RE: Error 101 unable to open file

I have full access to the server. Linux rights? or Notes rights?

I’m pretty sure in either case I can create files on the server.

Subject: RE: Error 101 unable to open file

yes, I meant Linux’s rights of your server user. You mean you are running Domino server from your own account as you say “I can create files on the server”.

Usually you run Domino from a dedicated user, say “Notes” and this user may not have rights to write files in this specific directory because, as you understand well, there is no such thing as “rights to write files on server” – each directory has a proper set of authorisations.

And yes, “Notes rights” cannot limit you writing to a filesystem or not; there are things like “unrestricted rights” that you (or agent) need to have in order the agent can write files, but the warning about that should come earlier – IMO you should not be able to launch the agent at all if the agent is not marked “allow restricted operations” on security tab.

Subject: RE: Error 101 unable to open file

The Notes server / Notes user account in Linux has access to the directory. But I still get the same error message.

Subject: RE: Error 101 unable to open file

what about a more conservative way to open file (not guessing that #1 handle is free):dim f as integer

f = FreeFile()

open outfile for output as #f

or try a different directory and/or try to just read an xisting file from the directory or just use Dir/GetFileAttr. Something must work… then maybe you may guess what’s different; or you can do anything else except create a new file? The filesystem in your directory is not remote by any chance?