9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] linux 9p: uid & gid
@ 2019-06-20 15:04 Oleg
  2019-06-20 16:34 ` Charles Forsyth
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg @ 2019-06-20 15:04 UTC (permalink / raw)
  To: 9fans

Hi, all.

I wrote a 9p fs with help of libixp and after mounting i see strange uid and
gid numbers for files:

~# mount -t 9p -o trans=unix,noextend q t
~# ls -l t
-rw-rw-rw- 1 4294967294 4294967294 1 Jan  1  1970 conf
-rw-rw-rw- 1 4294967294 4294967294 1 Jan  1  1970 data
-rw-rw-rw- 1 4294967294 4294967294 1 Jan  1  1970 stat

If i do mount with dfltuid and dfltgid, i get normal values:

~# mount -t 9p -o trans=unix,noextend,trans=unix,noextend,dfltuid=0,dfltgid=0 q t
~# ls -l t
-rw-rw-rw- 1 root root 1 Jan  1  1970 conf
-rw-rw-rw- 1 root root 1 Jan  1  1970 data
-rw-rw-rw- 1 root root 1 Jan  1  1970 stat

But in any case chown call to these files sends empty uid and gid strings in
wstat T-message.

Is there any way to make uid & gid works as expected?

Thanks.

-- 
Олег Неманов (Oleg Nemanov)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] linux 9p: uid & gid
  2019-06-20 15:04 [9fans] linux 9p: uid & gid Oleg
@ 2019-06-20 16:34 ` Charles Forsyth
  2019-06-21  8:34   ` Oleg
  0 siblings, 1 reply; 4+ messages in thread
From: Charles Forsyth @ 2019-06-20 16:34 UTC (permalink / raw)
  To: Oleg, Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

4294967294 probably started off as -2, which some systems used for user
"nobody"

On Thu, Jun 20, 2019 at 4:04 PM Oleg <lego12239@yandex.ru> wrote:

> Hi, all.
>
> I wrote a 9p fs with help of libixp and after mounting i see strange uid
> and
> gid numbers for files:
>
> ~# mount -t 9p -o trans=unix,noextend q t
> ~# ls -l t
> -rw-rw-rw- 1 4294967294 4294967294 1 Jan  1  1970 conf
> -rw-rw-rw- 1 4294967294 4294967294 1 Jan  1  1970 data
> -rw-rw-rw- 1 4294967294 4294967294 1 Jan  1  1970 stat
>
> If i do mount with dfltuid and dfltgid, i get normal values:
>
> ~# mount -t 9p -o
> trans=unix,noextend,trans=unix,noextend,dfltuid=0,dfltgid=0 q t
> ~# ls -l t
> -rw-rw-rw- 1 root root 1 Jan  1  1970 conf
> -rw-rw-rw- 1 root root 1 Jan  1  1970 data
> -rw-rw-rw- 1 root root 1 Jan  1  1970 stat
>
> But in any case chown call to these files sends empty uid and gid strings
> in
> wstat T-message.
>
> Is there any way to make uid & gid works as expected?
>
> Thanks.
>
> --
> Олег Неманов (Oleg Nemanov)
>
>

[-- Attachment #2: Type: text/html, Size: 1459 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] linux 9p: uid & gid
  2019-06-20 16:34 ` Charles Forsyth
@ 2019-06-21  8:34   ` Oleg
  2019-06-21  9:28     ` [9fans] [OBORONA-SPAM] " lego12239
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg @ 2019-06-21  8:34 UTC (permalink / raw)
  To: Charles Forsyth; +Cc: Fans of the OS Plan 9 from Bell Labs

On Thu, Jun 20, 2019 at 05:34:03PM +0100, Charles Forsyth wrote:
> 4294967294 probably started off as -2, which some systems used for user
> "nobody"

Yes. I understand that linux kernel try to keep work in this case and choose
this uid and gid. But it would be great if i can manage permissions as usual.
I need to give access to files based on uid and gid.


-- 
Олег Неманов (Oleg Nemanov)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] [OBORONA-SPAM] Re:  linux 9p: uid & gid
  2019-06-21  8:34   ` Oleg
@ 2019-06-21  9:28     ` lego12239
  0 siblings, 0 replies; 4+ messages in thread
From: lego12239 @ 2019-06-21  9:28 UTC (permalink / raw)
  To: Charles Forsyth, Fans of the OS Plan 9 from Bell Labs

On Fri, Jun 21, 2019 at 11:34:22AM +0300, Oleg wrote:
> On Thu, Jun 20, 2019 at 05:34:03PM +0100, Charles Forsyth wrote:
> > 4294967294 probably started off as -2, which some systems used for user
> > "nobody"
> 
> Yes. I understand that linux kernel try to keep work in this case and choose
> this uid and gid. But it would be great if i can manage permissions as usual.
> I need to give access to files based on uid and gid.

In previous project i use FUSE and permissions works well. Now i try 9p and
want to use the same approach with file permissions. But may be it mistake and
i need to use a different approach with granting access to files with 9p.

-- 
Олег Неманов (Oleg Nemanov)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-21  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20 15:04 [9fans] linux 9p: uid & gid Oleg
2019-06-20 16:34 ` Charles Forsyth
2019-06-21  8:34   ` Oleg
2019-06-21  9:28     ` [9fans] [OBORONA-SPAM] " lego12239

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 NNTP newsgroup(s).