How do you compile an application not as the ROOT user?[SOLVED]

Moderator: Forum moderators

Post Reply
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

How do you compile an application not as the ROOT user?[SOLVED]

Post by Jasper »

Hi all

I guess my title says it all :lol:

Occasionally, I come across an application that requires to be built not as the ROOT user.

I am using Fossapup64-95, can someone enlighten me?

TIA

Last edited by Jasper on Wed Jun 07, 2023 9:31 pm, edited 1 time in total.
User avatar
Sofiya
Posts: 2285
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1531 times

Re: How do you compile an application not as the ROOT user?

Post by Sofiya »

Jasper wrote: Wed Jun 07, 2023 3:48 pm

Hi all

I guess my title says it all :lol:

Occasionally, I come across an application that requires to be built not as the ROOT user.

I am using Fossapup64-95, can someone enlighten me?

TIA

Code: Select all

run-as-spot chromium

Code: Select all

run-as-spot program name

KL
PUPPY LINUX Simple fast free

dimkr
Posts: 2425
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1202 times

Re: How do you compile an application not as the ROOT user?

Post by dimkr »

run-as-spot bash to get a shell running as spot, then proceed normally from there.

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1983 times

Re: How do you compile an application not as the ROOT user?

Post by mikewalsh »

dimkr wrote: Wed Jun 07, 2023 4:41 pm

run-as-spot bash to get a shell running as spot, then proceed normally from there.

Wouldn't you then run into the issue of linking to/against root-owned system files? Or does that not matter? (Me no expert when it comes to compiling, 'cos my "skills" are utterly abysmal in this area!) :oops:

Mike. ;)

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: How do you compile an application not as the ROOT user?

Post by Jasper »

@dimkr

Trying to compile a new update for BusyBox ....... that's an example of an application that requires one to compile not as the root user.

Burunduk
Posts: 255
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: How do you compile an application not as the ROOT user?

Post by Burunduk »

Jasper wrote: Wed Jun 07, 2023 9:31 pm

Trying to compile a new update for BusyBox ....... that's an example of an application that requires one to compile not as the root user.

This is a bit strange. I've recently compiled Busybox 1.36.1 on Fossapup64-9.5 as root without a problem.
Edit: Tried again, against GNU libc this time - OK. It's even easier - just make menuconfig and then make. It seems you've updated a lot of tools on your system, maybe this makes a difference.

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: How do you compile an application not as the ROOT user?[SOLVED]

Post by Jasper »

@Burunduk

Thank you as always for your input/suggestions lol and more often the solutions :thumbup:

I am going to have another attempt at this, not sure what I have missed. I will as suggested do menuconfig beforehand :thumbup2:

The building tools I have updated but the core packages/libraries within Fossapup64-95 remain the same eg Python. This way hope updates will benefit other FP95 users. Unless I have uploaded an updated package ..... I do share them and add them as additional dependencies.

dimkr
Posts: 2425
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1202 times

Re: How do you compile an application not as the ROOT user?

Post by dimkr »

mikewalsh wrote: Wed Jun 07, 2023 7:05 pm
dimkr wrote: Wed Jun 07, 2023 4:41 pm

run-as-spot bash to get a shell running as spot, then proceed normally from there.

Wouldn't you then run into the issue of linking to/against root-owned system files? Or does that not matter?

Yes, you'll link at libraries in /lib, /usr/lib, etc', and they may be root owned. But this doesn't matter, because spot has read permissions.

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1983 times

Re: How do you compile an application not as the ROOT user?

Post by mikewalsh »

dimkr wrote: Thu Jun 08, 2023 3:45 pm
mikewalsh wrote: Wed Jun 07, 2023 7:05 pm
dimkr wrote: Wed Jun 07, 2023 4:41 pm

run-as-spot bash to get a shell running as spot, then proceed normally from there.

Wouldn't you then run into the issue of linking to/against root-owned system files? Or does that not matter?

Yes, you'll link at libraries in /lib, /usr/lib, etc', and they may be root owned. But this doesn't matter, because spot has read permissions.

Fair comment! That's something new I've learned today. All "grist for t' mill". Thanks!

Mike. ;)

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: How do you compile an application not as the ROOT user?[SOLVED]

Post by Jasper »

@Burunduk

Got it compile & working :thumbup: .............still unsure as to what I did wrong initially :oops:

Image

Post Reply

Return to “Compiling”