Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Questions about permission and rights access

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
Fulgurance
Veteran
Veteran
User avatar
Posts: 1287
Joined: Wed Feb 15, 2017 4:31 pm
Contact:
Contact Fulgurance
Website

Questions about permission and rights access

  • Quote

Post by Fulgurance » Sat Feb 22, 2025 12:25 pm

Hi guys, I try to understand something , because actually I can't get the result I would like.

Basically, for the package manager I made ISM, I would like every user in the group ISM can run the software.

But I am facing an issue. ISM sometimes need to run git commands. When for example it run git ls-remote, even the current user is in the ism group, git ls-remote just get an error
But if I login as user ism, it work. Do I need to set something more ?

To make you understand, it's what I did under my custom linux system:

Code: Select all

# alienware-m17-r3|root / 
>_ cd /var/ism/softwares/InitSystems-Main/
# alienware-m17-r3|root /var/ism/softwares/InitSystems-Main 
>_ ls -la
total 0
drwxrwxrwx 1 ism ism   20 Feb 21 14:46 .
drwxrwxrwx 1 ism ism 1358 Feb 21 10:33 ..
drwxrwxrwx 1 ism ism  154 Feb 18 10:36 .git
drwxrwxrwx 1 ism ism   24 Feb 16 21:29 Openrc
# alienware-m17-r3|root /var/ism/softwares/InitSystems-Main 
>_ git ls-remote 
fatal: No remote configured to list refs from.
# alienware-m17-r3|root /var/ism/softwares/InitSystems-Main 
>_ su - livecd
$ alienware-m17-r3|livecd /home/livecd 
>_ groups
livecd video wheel ism plugdev
$ alienware-m17-r3|livecd /home/livecd 
>_ git ls-remote
fatal: No remote configured to list refs from.
$ alienware-m17-r3|livecd /home/livecd 
>_ exit
logout
# alienware-m17-r3|root /var/ism/softwares/InitSystems-Main 
>_ su - ism
No directory, logging in with HOME=/
$ alienware-m17-r3|ism / 
>_ cd /var/ism/softwares/InitSystems-Main
$ alienware-m17-r3|ism /var/ism/softwares/InitSystems-Main 
>_ git ls-remote
From https://github.com/Fulgurance/InitSystems-Main
e9b4afbb8d264f20aa209c31bbd3ddd044e95df8        HEAD
e9b4afbb8d264f20aa209c31bbd3ddd044e95df8        refs/heads/master
c7f2b76df983036f244486d96f2c649f1685bedb        refs/tags/Alpha-07072023
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Feb 22, 2025 1:03 pm

2 things from the top of my head:

A single copy of git is supposed to be used by a single user.
It _can_ be configured to be used by a group, instead, but doing so you risk linux permissions getting in your way, so you shouldn't do that unless you can guarantee g+rw permissons on all files tracked by your repo. In case of a package manager, you can't.
So, what can you do about it?
1. Have ism switch user to a dedicated account.
2. (Shallow) clone your repo to a temporary location and work on it instead.
3. Set git to shared mode and then checkout to a new, disposable worktree, outside of repo directory. (This is basically #2, but won't instantly catch all your mistakes, so you get an opportunity to shoot your foot)


However, git started on a non-shared repo from a wrong user should tell you that it's not a shared repo and you're a wrong user. It should _refuse_ to work, and not _fail_ to work.
fatal: No remote configured to list refs from.
This looks like you actually managed to damage the repo somehow.
Except that it works on root. Root ignores access permissions.
Remotes are listed in .git/config. Can your user even access it?
Make Pipewire a system service
Top
Fulgurance
Veteran
Veteran
User avatar
Posts: 1287
Joined: Wed Feb 15, 2017 4:31 pm
Contact:
Contact Fulgurance
Website

  • Quote

Post by Fulgurance » Sat Feb 22, 2025 3:06 pm

Yes it's the weird point as I mentioned before. As you can see, when I login as ism user (so not root), it can read it. But not the other users, even root
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Feb 22, 2025 3:37 pm

Right. But that just means you have 2 problems there.
I understand why you don't want your system doing things you didn't expect. Can you read that git config manually from a wrong user rather than implicitly by invoking git? It's just a text file.
Is your repo configured to be shared by multiple users?

Regardless of the answers to above questions, you really shouldn't be sharing repos between users. I do get why you'd want to, but it will come back to bite you.
Make Pipewire a system service
Top
Fulgurance
Veteran
Veteran
User avatar
Posts: 1287
Joined: Wed Feb 15, 2017 4:31 pm
Contact:
Contact Fulgurance
Website

  • Quote

Post by Fulgurance » Sat Feb 22, 2025 4:48 pm

Yes, these repositories can be shared by all users in the group ism

But you said the file can be parse easily ? Maybe will be better I follow this way. Which file is it ?
My actual project: https://github.com/Fulgurance/ISM

Ingenius Software Manager is a tool to build and manage a Linux system from scratch.
It will able to manage a linux installation just with a given path to the futur root path
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Feb 22, 2025 7:48 pm

All metadata in git is text files, only the history is compressed (in .git/objects)
Remotes are listed in .git/config
Make Pipewire a system service
Top
Post Reply

6 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy