Re: Permission error

"Dragan" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
On 14/06/2022 13:56, Pierre Labastie ([email protected] via 
alfs-discuss Mailing List) wrote:
> On Tue, 2022-06-14 at 13:13 +0200, Dragan wrote:
>> Hi,
>>
>> I have tryed to build alfs in VM running Ubuntu 20.04 LTS and 22.04 LTS.
>> I'm getting following Permission denied.
>>
>> I have just entered sudo authorisation and jhalfs and sources
>> directories have been created and then...
>>
>> Are you happy with these optimization settings? yes/no (no): yes
>> ------------------------------------------------------------------------------
>> [sudo] password for lfs:
>> mkdir: cannot create directory '/lfs/jhalfs/logs': Permission denied
>>
>> <jhalfs> exit
>> make: *** [Makefile:11: all] Error 1
>> lfs@draak:~/jhalfs$
>>
>> lfs@draak:~/jhalfs$ ls -all /lfs
>> total 16
>> drwxrwxrwx  4 lfs  lfs  4096 Jun 14 08:47 .
>> drwxr-xr-x 23 lfs  lfs  4096 Jun 14 07:36 ..
>> drwxr-xr-x  2 root root 4096 Jun 14 08:47 jhalfs
>> drwxrwxrwt  2 root root 4096 Jun 14 08:47 sources
>> lfs@draak:~/jhalfs$
>>
>> The user lfs have as I believe all neccesary rights. See attached file
>> for jhalfs configuration and somme additional info.
>>
>> The problem appears not to be limited to user lfs.
>>
>> I'm guesing that script at that point drops sudo authorisation and tries
>> to make subdirectory in jhalfs as user lfs who have no rights to write
>> in directory owned by root.
>>
>> Any suggestion wil be appreciated.
> Hmm, You shouldn't create any directory inside /lfs. jhalfs will take care of
> creating them. Also, /lfs should be owned by root, and there is no need to have
> an lfs user before starting jhalfs: the user will be created by the tool.
>
> What I suggest:
> sudo rm -rf /lfs/*
>
> (unless there is a lost+found directory in /lfs, in which case you should keep
> that one).
>
> Then run make in the cloned jhalfs dir. Answer the questions. Be sure to tick
> "Rebuild files" in "General Settings", and of course to set the Build directory
> to /lfs.
>
> Pierre
> PS: There was no attached file. But I do not think they are needed at this
> stage.

Thanks for reply.

I have chowned lfs to root:root, remowed user lfs and retrived jhalfs 
from git.

It's building now without asking me for sudo authorisation! Probably 
inherited athorisation because of previously

And I just got another error:

  Building target 602-ncurses
  [+++++++++++++++++++++++++++++++++++++++++++++++++++++|make: *** 
[Makefile:342: 602-ncurses] Error 1
make: Leaving directory '/lfs/jhalfs'
make[1]: *** [Makefile:102: mk_LUSER] Error 2
make[1]: Leaving directory '/lfs/jhalfs'
ERROR:  Error 2 at common/common-functions line 38!
<jhalfs> exit
make: *** [Makefile:11: all] Error 2
draak@draak-VirtualBox:~/jhalfs$

Dragan

PS: Strange that there was no attachemnt. I can see 1 attachment: alfs 
3,1 KB in my inbouund mail!

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.