From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 20 Jun 2019 18:04:36 +0300 From: Oleg To: 9fans@9fans.net Message-ID: <20190620150435.GA31903@legohost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.11.2 (2019-01-07) Content-Transfer-Encoding: quoted-printable Subject: [9fans] linux 9p: uid & gid Topicbox-Message-UUID: 01068612-eada-11e9-9d60-3106f5b1d025 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=3Dunix,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=3Dunix,noextend,trans=3Dunix,noextend,dfltuid=3D0= ,dfltgid=3D0 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. --=20 =D0=9E=D0=BB=D0=B5=D0=B3 =D0=9D=D0=B5=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2 (Oleg= Nemanov) From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: <20190620150435.GA31903@legohost> In-Reply-To: <20190620150435.GA31903@legohost> From: Charles Forsyth Date: Thu, 20 Jun 2019 17:34:03 +0100 Message-ID: To: Oleg , Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary="00000000000095078b058bc3ea2b" Subject: Re: [9fans] linux 9p: uid & gid Topicbox-Message-UUID: 010abbce-eada-11e9-9d60-3106f5b1d025 --00000000000095078b058bc3ea2b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 4294967294 probably started off as -2, which some systems used for user "nobody" On Thu, Jun 20, 2019 at 4:04 PM Oleg 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=3Dunix,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=3Dunix,noextend,trans=3Dunix,noextend,dfltuid=3D0,dfltgid=3D0 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. > > -- > =D0=9E=D0=BB=D0=B5=D0=B3 =D0=9D=D0=B5=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2 (Oleg= Nemanov) > > --00000000000095078b058bc3ea2b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
4294967294 probably start= ed 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 an= d
gid numbers for files:

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

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

~# mount -t 9p -o trans=3Dunix,noextend,trans=3Dunix,noextend,dfltuid=3D0,d= fltgid=3D0 q t
~# ls -l t
-rw-rw-rw- 1 root root 1 Jan=C2=A0 1=C2=A0 1970 conf
-rw-rw-rw- 1 root root 1 Jan=C2=A0 1=C2=A0 1970 data
-rw-rw-rw- 1 root root 1 Jan=C2=A0 1=C2=A0 1970 stat

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

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

Thanks.

--
=D0=9E=D0=BB=D0=B5=D0=B3 =D0=9D=D0=B5=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2 (Oleg N= emanov)

--00000000000095078b058bc3ea2b-- From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 21 Jun 2019 11:34:22 +0300 From: Oleg To: Charles Forsyth Message-ID: <20190621083422.GA18818@legohost> References: <20190620150435.GA31903@legohost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) Content-Transfer-Encoding: quoted-printable Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] linux 9p: uid & gid Topicbox-Message-UUID: 011aeb34-eada-11e9-9d60-3106f5b1d025 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 cho= ose this uid and gid. But it would be great if i can manage permissions as us= ual. I need to give access to files based on uid and gid. --=20 =D0=9E=D0=BB=D0=B5=D0=B3 =D0=9D=D0=B5=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2 (Oleg= Nemanov) From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 21 Jun 2019 12:28:54 +0300 From: lego12239@yandex.ru To: Charles Forsyth , Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20190621092854.GA13537@legohost> References: <20190620150435.GA31903@legohost> <20190621083422.GA18818@legohost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190621083422.GA18818@legohost> User-Agent: Mutt/1.11.2 (2019-01-07) Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] [OBORONA-SPAM] Re: linux 9p: uid & gid Topicbox-Message-UUID: 01218408-eada-11e9-9d60-3106f5b1d025 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 us= er > > "nobody" >=20 > Yes. I understand that linux kernel try to keep work in this case and c= hoose > 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 a= nd want to use the same approach with file permissions. But may be it mistak= e and i need to use a different approach with granting access to files with 9p. --=20 =D0=9E=D0=BB=D0=B5=D0=B3 =D0=9D=D0=B5=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2 (Oleg= Nemanov)