comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: cannot write to a file in Linux despite +rw permissions
Date: Fri, 18 Jan 2013 10:59:18 +0000 (UTC)
Date: 2013-01-18T10:59:18+00:00	[thread overview]
Message-ID: <kdb9u6$t13$1@dont-email.me> (raw)
In-Reply-To: 1d536a59-c2e6-40d8-bf1e-fa7a0b4a923a@googlegroups.com

On Fri, 18 Jan 2013 02:13:55 -0800, Ada novice wrote:

> Hello,
>       I am a newbie in Linux and I have recently installed swiftlinux,
>       which is Debian based. I am testing my Ada codes. They run well (I
>       have put GNAT GPL 2011 for now), except that I see that I cannot
>       write to text files. I have issued the command "chmod -R +rw" to
>       the parent folder but that doesn't help and neither did running
>       GPS as root help.

> Since the code compiles and runs fine in GPS, I do not understand why
> the file cannot be written in the above case with the X and Y values.
> 
> Guess it must be something on Linux that I am not paying attention to.

Works fine here (OpenSuse 11.3)
gnatmake --version
GNATMAKE 4.6.3 20120531 [gcc-4_6-branch revision 188067]
Copyright (C) 1995-2011, Free Software Foundation, Inc.

Check you are using the Gnat you think you are :
 which gnatmake
/usr/bin/gnatmake

In my case, that's the distribution's own (what you would get by typing
sudo apt-get install gnat
on Debian) I think the Adacore one would be in /usr/gnat/bin.

The system will use whichever is first in the path; you can modify it as 
follows:

echo $PATH
/home/brian/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

export PATH=/usr/gnat/bin:$PATH

echo $PATH
/usr/gnat/bin:/home/brian/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/
usr/X11R6/bin:/usr/games:

which gnatmake
/usr/gnat/bin/gnatmake

Here, both work on your test. But it is possible you have a broken 
install from Swiftlinux so it may be worth checking.

- Brian





  parent reply	other threads:[~2013-01-18 10:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 10:13 cannot write to a file in Linux despite +rw permissions Ada novice
2013-01-18 10:37 ` Jacob Sparre Andersen
2013-01-18 11:15   ` Ada novice
2013-01-18 10:59 ` Brian Drummond [this message]
2013-01-18 11:19   ` Ada novice
2013-01-18 15:44     ` Ada novice
2013-01-18 23:36       ` Brian Drummond
2013-01-19  7:08         ` Ada novice
2013-01-19 10:11           ` Brian Drummond
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox