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 15:54, Dragan ([email protected] via alfs-discuss Mailing 
List) wrote:
>
> 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!

 From 602-ncurses-6.3 log file:

     You may see messages regarding extended capabilities, e.g., AX.
     These are extended terminal capabilities which are compiled
     using
         tic -x
     If you have ncurses 4.2 applications, you should read the INSTALL
     document, and install the terminfo without the -x option.

ncurses 6.3.20211021
"terminfo.tmp", line 1152, col 36, terminal 'fbterm': limiting value of 
`pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 5136, col 36, terminal 'xterm+256color': limiting 
value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 5168, col 36, terminal 'xterm+256setaf': limiting 
value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 5215, col 25, terminal 'xterm+direct2': limiting 
value of `colors' from 0x1000000 to 0x7fff
"terminfo.tmp", line 5215, col 40, terminal 'xterm+direct2': limiting 
value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 5230, col 25, terminal 'xterm+direct': limiting 
value of `colors' from 0x1000000 to 0x7fff
"terminfo.tmp", line 5230, col 40, terminal 'xterm+direct': limiting 
value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 5252, col 25, terminal 'xterm+indirect': limiting 
value of `colors' from 0x1000000 to 0x7fff
"terminfo.tmp", line 5252, col 40, terminal 'xterm+indirect': limiting 
value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 8248, col 36, terminal 'dvtm-256color': limiting 
value of `pairs' from 0x10000 to 0x7fff
1788 entries written to /lfs/usr/share/terminfo
** built new /lfs/usr/share/terminfo
** sym-linked /lfs/usr/lib/terminfo for compatibility
installing std
installing stdcrt
installing vt100
installing vt300
finished install.data
/usr/bin/install -c ncurses-config /lfs/usr/bin/ncursesw6-config
make[2]: Leaving directory '/lfs/sources/ncurses-6.3/misc'
make[1]: Leaving directory '/lfs/sources/ncurses-6.3'
rm: cannot remove '/lfs/usr/lib/libncurses++w.a': No such file or directory

Dragan

-- 
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.