Page 1 of 1

Acces Denied to readfile

Posted: Fri Feb 29, 2008 7:52 am
by Snuff
I've do a little script, in a package, to test the I/O function's on file ".txt"

Code: Select all

use file;
use cfgfile;
use uo;

program textcmd_scrivifile ( who, filename )

	var esito := readfile(filename);
	SendSysMessage( who, "esito path: " + esito );

endprogram
Into var ESITO will must be the return of the readfile().

As input paramenter i send this string:
:pkgtest:lettura.txt

In lettura.txt there's the string "Prova di lettura"

In all case the return of function is "ACCESS DENIED"

I've tried to check windows privs on R/W (but it's all ok)
I've tried to reinstall all but nothing.

The same script with the same folders and package run correctly in a computer's friend.

The POL version is 096.7 Vestal Virgin. and OS version Windows XP PRO

What's the problem?
thx to all

Posted: Fri Feb 29, 2008 11:20 am
by Pierce
You need a fileaccess.cfg inside your config folder which contains the following (just an example):

Code: Select all

FileAccess
{
  Package *
  Directory *
  AllowRead 1
  AllowWrite 1
  AllowAppend 1
  AllowRemote 0
  Extension .txt
}

Posted: Fri Feb 29, 2008 11:58 am
by Snuff
Problem solved.

Thx for solution :D