comp.lang.ada
 help / color / mirror / Atom feed
From: "M. Strobel" <strobel@example.com>
Subject: Re: Create in a root directory (Linux)
Date: Tue, 3 Nov 2015 12:12:30 +0100
Date: 2015-11-03T12:12:30+01:00	[thread overview]
Message-ID: <d9rj4uFkc3qU1@mid.individual.net> (raw)
In-Reply-To: <c1b32b8a-b00a-4055-90e8-025c9fe8c07e@googlegroups.com>

On 29.10.2015 08:00, comicfanzine@gmail.com wrote:
> Le mercredi 28 octobre 2015 18:31:29 UTC+1, comicf...@gmail.com a écrit :
>> Hi ,
>> I want to create a file in a root directory : "/"
>> And of course i am root . How can i proceed ? i always get the error : "permission denied" .
>>
>> Here is the code that i tried :
>>
>> [code]WITH Ada.Text_IO ;  USE Ada.Text_IO ; 
>>
>> PROCEDURE TestFichier IS
>>
>>    MonFichier : File_type ; 
>>    
>> BEGIN 
>>    Create( MonFichier,Name => " /clone.adb");
>>    close(MonFichier);
>> END TestFichier ;
> 
> Solved ! The solution was to execute the program in the terminal with "sudo" . That didn't work because i had execute the program from scite(my IDE) , and he don't recognize sudo .
> 

And, by the way, as an admin on Linux I would (in general) never allow such files on
my systems' root directory. There are quite some "standards" and a lot of best
practices telling where putting which files is best done.

/Str.


      parent reply	other threads:[~2015-11-03 11:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 17:31 Create in a root directory (Linux) comicfanzine
2015-10-28 20:12 ` Simon Wright
2015-10-28 23:01   ` Paul Rubin
2015-10-29  6:41     ` comicfanzine
2015-10-29  6:50     ` comicfanzine
2015-10-29  7:00 ` comicfanzine
2015-11-01 14:23   ` Kevin K
2015-11-03 11:12   ` M. Strobel [this message]
replies disabled

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