unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Reza Alizadeh Majd <r.majd@pantherx.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: help-guix@gnu.org
Subject: Re: set permission/ownership for files generated by service
Date: Wed, 15 Jul 2020 00:35:34 +0430	[thread overview]
Message-ID: <20200715003534.1b9b6fd5@panther-arch.localdomain> (raw)
In-Reply-To: <20200714123641.GH10256@E5400>

On Tue, 14 Jul 2020 15:36:41 +0300
Efraim Flashner <efraim@flashner.co.il> wrote:

> On Tue, Jul 14, 2020 at 04:46:31PM +0430, Reza Alizadeh Majd wrote:
> > 
> > I assume that I find the issue source: 
> >   
> > > > > >
> > > > > >--8<---------------cut
> > > > > >here---------------start------------->8---
> > > > > >
> > > > > >(define %kyc-accounts
> > > > > >  (list (user-group (name "kyc-service"))
> > > > > >        (user-group (name "kyc-rpc"))
> > > > > >        (user-account
> > > > > >          (name "kyc-service")
> > > > > >          (group "kyc-service")
> > > > > >          (system? #f)
> > > > > >          (supplementary-groups '("wheel" "kyc-rpc" "video"))
> > > > > >          (comment "KYC service user"))))
> > > > > >
> > > > > >--8<---------------cut
> > > > > >here---------------end--------------->8---
> > > > > >  
> > 
> > I modified the service definition to open an empty 'screen', so I
> > can access shell through service, when I connect to the screen and
> > check user groups, it seems that the 'supplementary-groups' didn't
> > apply to the user:
> > 
> > --8<---------------cut here---------------start------------->8---
> > sh-5.0$ whoami 
> > kyc-service
> > sh-5.0$ groups
> > kyc-service
> > sh-5.0$ 
> > --8<---------------cut here---------------end--------------->8---
> > 
> > so, is there any thing that I missed?
> >   
> 
> The only other thing I can think of right now is that you're creating
> the kyc-service and kyc-rpc groups AND also using them for the first
> time here. It could be that the kyc-service group is created with the
> kyc-service user and the kyc-rpc group is 'too slow'. Try your code
> again but without the kyc-rpc group.
> 

I don't think, since the issue still persists after restarting the
services, or even by rebooting the machine. I also checked the
`/etc/group` and `kyc-service` user exists in all of the supplementary
groups. but the `groups` command shows only the primary group. 

--8<---------------cut here---------------start------------->8---
sh-5.0$ cat /etc/group  | grep "kyc"
kyc-user:x:30002:
kyc-rpc:x:30001:kyc-user,kyc-service
kyc-service:x:980:
wheel:x:999:kyc-user,kyc-service
video:x:992:kyc-user,kyc-service
--8<---------------cut here---------------end--------------->8---

is it possible that I missed to set any environment variable, so the
permissions wouldn't be loaded correctly?

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/


      reply	other threads:[~2020-07-14 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  0:18 set permission/ownership for files generated by service Reza Alizadeh Majd
2020-07-14  2:01 ` Julien Lepiller
2020-07-14  8:24   ` Reza Alizadeh Majd
2020-07-14  9:10     ` Efraim Flashner
2020-07-14 11:24       ` Reza Alizadeh Majd
2020-07-14 12:16       ` Reza Alizadeh Majd
2020-07-14 12:36         ` Efraim Flashner
2020-07-14 20:05           ` Reza Alizadeh Majd [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200715003534.1b9b6fd5@panther-arch.localdomain \
    --to=r.majd@pantherx.org \
    --cc=efraim@flashner.co.il \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).