Thanks both of you for your answers,

I was thinking about modifying $FG_ROOT/Nasal/IOrules file for beating the
permission issue but I hadn't thought about file permissions especially in
linux.

Then there are two solutions for beating this problem;
First is creating an empty and permanent file before running Nasal code and
modifying it instead of creating it inside the Nasal code.
And the second is creating ~/home/FlightGear/  folder and working under it.

Since first solution also requires super-user privileges in Linux, the ideal
solution seems to be the second one.

If someone has a better idea, it would be very good to hear it.

Greetings.

2009/9/4 Anders Gidenstam <anders-...@gidenstam.org>

> On Fri, 4 Sep 2009, Behlül UÇAR wrote:
>
>  Hi,
>>
>> I want to ask a question regarding to the authorization problems on
>> input/output operations.
>>
>> How can we have the value of $FG_ROOT and $FG_HOME in Nasal scripts. Is it
>> possible? Is there a globally defined macro for them?
>>
>> I want to write a Nasal function that creates a file under $FG_ROOT, I
>> want
>> it to be portable, I mean both works on windows and linux machines. For
>> this
>> reason, I have to use a macro like $FG_ROOT, is it possible?
>>
>
> IIRC the values of $FG_ROOT and $FG_HOME are available as properties (below
> sim/ ?). I think that by default you can only write files with certain
> extensions to $FG_HOME and nothing at all to $FG_ROOT.
> FlightGear's internal access rules for Nasal scripts are defined in
> $FG_ROOT/Nasal/IOrules but of course the file system permissions
> must also permit the action you want to do.
>
> Cheers,
>
> Anders
> --
> ---------------------------------------------------------------------------
> Anders Gidenstam
> WWW: http://www.gidenstam.org/FlightGear/
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to