Page 1 of 1
A possible bug with fileaccess.cfg
Posted: Sat Apr 29, 2017 5:56 pm
by Yukiko
As I understand it, you are supposed to be able to specify which package can perform whatever functions you give them rights to. So I made the following entry:
Code: Select all
FileAccess Commands
{
Package commands
Extension .cfg
AllowRead 1
AllowRemote 1
AllowWrite 1
AllowAppend 1
}
I have a command in the ..\commands\test directory which needs access to the POL root directory to create a folder there and write cfg files in it. However with the above entry the command can create the directory but it can't create any files in the directory. If I change the entry in fileaccess.cfg to:
Code: Select all
FileAccess Commands
{
Package *
Extension cfg
AllowRead 1
AllowRemote 1
AllowWrite 1
AllowAppend 1
}
It works but I'd rather not give universal access for cfg file creation.
So the question is: Am I doing something wrong or is this a bug (feature

) of POL?
Re: A possible bug with fileaccess.cfg
Posted: Sun Apr 30, 2017 2:09 am
by Turley
Mmmh can you post the content of the pkg.cfg where the command exists in?
Re: A possible bug with fileaccess.cfg
Posted: Mon May 01, 2017 1:56 pm
by Yukiko
Here's the pkg.cfg. It's pretty much copied from Austin's 0.96 or 0.97 Distro. Now the actual command lives in a subdirectory, 'test', under the 'commands' directory but none of the subdirectories there contain any pkg.cfg files.
Code: Select all
# $Id: pkg.cfg 373 2006-06-17 18:27:33Z austinheilman $
#
#
Enabled 1
Name commands
Version 1.0
CoreRequired 96
Maintainer Distro Team
Email distro@polserver.com
Re: A possible bug with fileaccess.cfg
Posted: Mon May 08, 2017 4:26 pm
by Yukiko
Nothing new on this yet Turley?
Re: A possible bug with fileaccess.cfg
Posted: Wed May 10, 2017 1:51 am
by Turley
Sorry I'm currently working for 2 weeks in Japan. I think I have to test it myself to understand the problem. Currently it's a bit unclear why this happens, maybe a bug in the core or we oversee something.
Re: A possible bug with fileaccess.cfg
Posted: Wed May 10, 2017 11:44 pm
by Yukiko
How can you let work get in the way of POL?
Ok. It's not a showstopper bug for me because I only need to have access to the folder for a one time script. Then I can remove the file access rights but I thought you should be aware of it.
Re: A possible bug with fileaccess.cfg
Posted: Thu May 11, 2017 2:36 pm
by Nando
If I remember correctly, you also can define a Directory for the Fileaccess. By default it only allows inside the package you named...
Could you check if that's the case?
Re: A possible bug with fileaccess.cfg
Posted: Thu May 11, 2017 11:19 pm
by Yukiko
I can but with the wildcard * in the Package element it worked with a Directory element. Will get back to you with a report.
Re: A possible bug with fileaccess.cfg
Posted: Thu May 11, 2017 11:34 pm
by Nando
Oh, sorry. I just checked the code: the Directory flag is not implemented yet. I'll have to look into it with more time later...
Re: A possible bug with fileaccess.cfg
Posted: Thu May 11, 2017 11:38 pm
by Yukiko
Now that you mention it I remember seeing that comment in the fileaccess.cfg file.

Re: A possible bug with fileaccess.cfg
Posted: Thu Aug 31, 2017 10:02 am
by Yukiko
Maybe this should be looked at and fixed if possible before we finalize POL 0.99.