🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
16 messages
16 total messages Started by SEC3 Thu, 03 Sep 2020 03:14
Linux file permissions question
#310530
Author: SEC3
Date: Thu, 03 Sep 2020 03:14
31 lines
2051 bytes
I have been helping Zip2 remop set up her remailer and pinger.

When the Zip2 pinger has been operating successfully for a week or two I
would like to advise Zip2 on how to configure Mixmaster remailer server
to use the stats and keys from her local Echolot pinger instead of
routinely grabbing them (via a cronjob) from another pinger service like
SEC3 (Zip2 remailer's current strategy).

As I remember the advice given to me years ago by Frell Admin was to add
these lines to Mixmaster's mix.cfg file:

TYPE2REL	/home/echolot/echolot/results/mlist.txt
TYPE1LIST	/home/echolot/echolot/results/rlist.txt
PUBRING		/home/echolot/echolot/results/pubring.mix
PGPREMPUBASC	/home/echolot/echolot/results/pgp-all.asc
TYPE2LIST	/home/echolot/echolot/results/type2.list

But I suspect there is more to be done than that. The Mixmaster user
(/home/mix) will not be able to read files owned by the Echolot pinger
user (/home/echolot). So some file permissions tweaking is also required.

Can someone help me with that? Is it enough to put user mix in user
echolot's group?


-- 
SEC3

Contact information at <https://sec3.net>
I am also on Keybase <https://keybase.io/sec3>
YAMN Help <https://sec3.net/yamnhelp/>
Re: Linux file permissions question
#310538
Author: Grant Taylor
Date: Thu, 03 Sep 2020 15:18
23 lines
1925 bytes
On 9/2/20 9:14 PM, SEC3 wrote:
> But I suspect there is more to be done than that. The Mixmaster user
> (/home/mix) will not be able to read files owned by the Echolot pinger
> user (/home/echolot). So some file permissions tweaking is also required.

Will the Echolot pinger be publishing the files via a web page?  If so, 
the Mixmaster user can download from said web page.

> Can someone help me with that? Is it enough to put user mix in user
> echolot's group?

You can probably have the Echolot user copy the stats files to somewhere 
else on the system that the Mixmaster user can read.  Presuming you 
don't want to change the permissions of Echolot or Mixmaster itself.

There are a lot of ways to achieve this goal.  It's highly dependent on 
what restrictions Echolot and Mixmaster impose and what you want to do.



-- 
Grant. . . .
unix || die
Re: Linux file permissions question
#310539
Author: SEC3
Date: Thu, 03 Sep 2020 15:39
37 lines
2302 bytes
On 2020-09-03 11:18 a.m., Grant Taylor wrote:
> On 9/2/20 9:14 PM, SEC3 wrote:
>> But I suspect there is more to be done than that. The Mixmaster user
>> (/home/mix) will not be able to read files owned by the Echolot pinger
>> user (/home/echolot). So some file permissions tweaking is also required.
> 
> Will the Echolot pinger be publishing the files via a web page?  If so,
> the Mixmaster user can download from said web page.

Yep, that is by far the easiest solution! But Web pages sometimes go
down. Grabbing a remailer's keys and stats locally from a local pinger
would be more reliable.

> 
>> Can someone help me with that? Is it enough to put user mix in user
>> echolot's group?
> 
> You can probably have the Echolot user copy the stats files to somewhere
> else on the system that the Mixmaster user can read.  Presuming you
> don't want to change the permissions of Echolot or Mixmaster itself.

I do want to change the permissions but don't know how to. I want the
mix user (or mixmaster program) at Zip2's server to be able to read
files owned by the echolot user. Specifically, the files in this folder

/home/echolot/echolot/results
 And so, the command would be...

chown ???


-- 
SEC3

Contact information at <https://sec3.net>
I am also on Keybase <https://keybase.io/sec3>
YAMN Help <https://sec3.net/yamnhelp/>
Re: Linux file permissions question
#310541
Author: SEC3
Date: Thu, 03 Sep 2020 15:59
50 lines
3412 bytes
On 2020-09-03 11:39 a.m., SEC3 wrote:
 Specifically, the files in this folder
> 
> /home/echolot/echolot/results

Here's what the current permissions on those files look like. This is
from my SEC3 pinger but Zip2's files would look the same:

echolot@caputo:~/echolot/results$ ls -la
total 184
drwxr-xr-x  3 echolot echolot  4096 Mar  9 17:47 .
drwxr-xr-x 15 echolot echolot  4096 Sep  1 20:30 ..
-rw-r--r--  1 echolot echolot  1842 Sep  3 11:55 echolot.css
-rw-r--r--  1 echolot echolot  2517 Sep  3 11:55 echolot.html
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 echolot.html.meta
-rw-r--r--  1 echolot echolot  3143 Sep  3 11:00 from.html
-rw-r--r--  1 echolot echolot    41 Sep  3 11:00 from.html.meta
-rw-r--r--  1 echolot echolot  8851 Sep  3 11:55 mlist2.html
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 mlist2.html.meta
-rw-r--r--  1 echolot echolot  4177 Sep  3 11:55 mlist2.txt
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 mlist2.txt.meta
-rw-r--r--  1 echolot echolot  2995 Sep  3 11:55 mlist.html
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 mlist.html.meta
-rw-r--r--  1 echolot echolot  1145 Sep  3 11:55 mlist.txt
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 mlist.txt.meta
-rw-r--r--  1 echolot echolot 19856 Sep  3 04:00 pgp-all.asc
-rw-r--r--  1 echolot echolot    41 Sep  3 04:00 pgp-all.asc.meta
-rw-r--r--  1 echolot echolot  3074 Sep  3 04:00 pgp-rsa.asc
-rw-r--r--  1 echolot echolot    41 Sep  3 04:00 pgp-rsa.asc.meta
-rw-r--r--  1 echolot echolot 22747 Sep  3 04:00 pubring.mix
-rw-r--r--  1 echolot echolot    41 Sep  3 04:00 pubring.mix.meta
-rw-r--r--  1 echolot echolot  7336 Sep  3 11:55 rlist2.html
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 rlist2.html.meta
-rw-r--r--  1 echolot echolot  2868 Sep  3 11:55 rlist2.txt
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 rlist2.txt.meta
-rw-r--r--  1 echolot echolot  4957 Sep  3 11:55 rlist.html
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 rlist.html.meta
-rw-r--r--  1 echolot echolot  2820 Sep  3 11:55 rlist.txt
-rw-r--r--  1 echolot echolot    41 Sep  3 11:55 rlist.txt.meta
drwxr-xr-x  2 echolot echolot  4096 Aug 26 09:04 thesaurus
-rw-r--r--  1 echolot echolot  1813 Sep  3 04:00 type2.list
-rw-r--r--  1 echolot echolot    41 Sep  3 04:00 type2.list.meta


-- 
SEC3

Contact information at <https://sec3.net>
I am also on Keybase <https://keybase.io/sec3>
YAMN Help <https://sec3.net/yamnhelp/>
Re: Linux file permissions question
#310544
Author: Grant Taylor
Date: Thu, 03 Sep 2020 18:56
31 lines
2173 bytes
On 9/3/20 9:39 AM, SEC3 wrote:
> Yep, that is by far the easiest solution! But Web pages sometimes 
> go down. Grabbing a remailer's keys and stats locally from a local 
> pinger would be more reliable.

I was implying running the web server on the local system.  But your 
concern stands.  IMHO it's just less likely on the local host.

> I do want to change the permissions but don't know how to. I want the 
> mix user (or mixmaster program) at Zip2's server to be able to read 
> files owned by the echolot user. Specifically, the files in this folder

See my forthcoming reply to your reply with the ls output.

> /home/echolot/echolot/results
>   And so, the command would be...
> 
> chown ???

Well, yes and no.  You probably don't want to change the ownership of 
the files that Echolot or Mixmaster use.  You may copy files to a 
temporary staging location and chown those copies.

"chmod" is the other command that you may want to use to change the 
permissions on files.



-- 
Grant. . . .
unix || die
Re: Linux file permissions question
#310548
Author: Grant Taylor
Date: Thu, 03 Sep 2020 19:00
36 lines
2073 bytes
On 9/3/20 9:59 AM, SEC3 wrote:
> Here's what the current permissions on those files look like. This 
> is from my SEC3 pinger but Zip2's files would look the same:

ACK

> echolot@caputo:~/echolot/results$ ls -la
> total 184
> drwxr-xr-x  3 echolot echolot  4096 Mar  9 17:47 .

World has access to the current directory (~/echolot/results).

> drwxr-xr-x 15 echolot echolot  4096 Sep  1 20:30 ..

World had access to the parent directory (~/echolot)

> <snip>

World has read on all these files.

> drwxr-xr-x  2 echolot echolot  4096 Aug 26 09:04 thesaurus

World has access to this directory (~/echolot/results/thesaurus).

So, if world also has read on ~/, then chances are quite good that the 
Mixmaster user will be able to read these files as they are where they are.

Please run the following command:

    namei -l ~/echolot/results



-- 
Grant. . . .
unix || die
Re: Linux file permissions question
#310547
Author: SEC3
Date: Thu, 03 Sep 2020 19:31
28 lines
1831 bytes
On 2020-09-03 3:00 p.m., Grant Taylor wrote:
> On 9/3/20 9:59 AM, SEC3 wrote:

> World has read on all these files.
>
>> drwxr-xr-x  2 echolot echolot  4096 Aug 26 09:04 thesaurus
>
> World has access to this directory (~/echolot/results/thesaurus).
>
> So, if world also has read on ~/, then chances are quite good that the
> Mixmaster user will be able to read these files as they are where they
are.

That makes sense. 'Good to know.

> Please run the following command:
>
>    namei -l ~/echolot/results

echolot@caputo:~$ namei -l ~/echolot/results
f: /home/echolot/echolot/results
drwxr-xr-x root    root    /
drwxr-xr-x root    root    home
drwxr-xr-x echolot echolot echolot
drwxr-xr-x echolot echolot echolot
drwxr-xr-x echolot echolot results

SEC3
Re: Linux file permissions question
#310560
Author: elvis-85781
Date: Fri, 04 Sep 2020 23:53
9 lines
1250 bytes
>> Will the Echolot pinger be publishing the files via a web page?  If so,
>> the Mixmaster user can download from said web page.
>
> Yep, that is by far the easiest solution! But Web pages sometimes go
> down. Grabbing a remailer's keys and stats locally from a local pinger
> would be more reliable.

Wouldn't the web service be on the same computer and so unlikely
to be unreachable?
Re: Linux file permissions question
#310567
Author: elvis-85781
Date: Fri, 04 Sep 2020 23:57
5 lines
995 bytes
> "chmod" is the other command that you may want to use to change the 
> permissions on files.

looks like it won't be needed but more complicated situations
can make use of setfacl
Re: Linux file permissions question
#310568
Author: SEC3
Date: Sat, 05 Sep 2020 02:36
26 lines
1971 bytes
On 2020-09-04 7:53 p.m., elvis-85781@notatla.org.uk wrote:
>>> Will the Echolot pinger be publishing the files via a web page?  If so,
>>> the Mixmaster user can download from said web page.
>>
>> Yep, that is by far the easiest solution! But Web pages sometimes go
>> down. Grabbing a remailer's keys and stats locally from a local pinger
>> would be more reliable.
> 
> Wouldn't the web service be on the same computer and so unlikely
> to be unreachable?
> 

Yes, Echolot relies on a local web server to publish its stats pages.

And yes, I take your point. It's debatebable whether grabbing stats from
the Echolot service local pinger would be more reliable than grabbing
them via a stats page URL. They are essentially the same source. The Web
URL is just a symlink to the Echolot /results/ folder.


-- 
SEC3

Contact information at <https://sec3.net>
I am also on Keybase <https://keybase.io/sec3>
YAMN Help <https://sec3.net/yamnhelp/>
Re: Linux file permissions question
#310570
Author: Nomen Nescio
Date: Sat, 05 Sep 2020 03:58
10 lines
1302 bytes
SEC3 <noreply@sec3.net> writes:

> I do want to change the permissions but don't know how to. I want the
> mix user (or mixmaster program) at Zip2's server to be able to read
> files owned by the echolot user.

You can put mix and echolot users in the same group, but then mix user
will be able not only read but also write files that belong to echolot
user. If you want more fine-tuned control you'll have to use ACL (Access
Control List). Just google "linux acl vs permissions."
Re: Linux file permissions question
#310572
Author: SEC3
Date: Sat, 05 Sep 2020 04:16
21 lines
1697 bytes
On 2020-09-04 11:58 p.m., Nomen Nescio wrote:
> SEC3 <noreply@sec3.net> writes:
> 
>> I do want to change the permissions but don't know how to. I want the
>> mix user (or mixmaster program) at Zip2's server to be able to read
>> files owned by the echolot user.
> 
> You can put mix and echolot users in the same group, but then mix user
> will be able not only read but also write files that belong to echolot
> user. If you want more fine-tuned control you'll have to use ACL (Access
> Control List). Just google "linux acl vs permissions."

Thanks for the advice.


-- 
SEC3

Contact information at <https://sec3.net>
I am also on Keybase <https://keybase.io/sec3>
YAMN Help <https://sec3.net/yamnhelp/>
Re: Linux file permissions question
#310573
Author: Grant Taylor
Date: Sat, 05 Sep 2020 05:08
28 lines
2177 bytes
On 9/4/20 8:36 PM, SEC3 wrote:
> It's debatebable whether grabbing stats from the Echolot service 
> local pinger would be more reliable than grabbing them via a stats 
> page URL.

I'd argue that there is slightly less reliability by using the web 
server verses files on the local file system, simply because another 
service is in the path.

> They are essentially the same source.

The data may be the same.  But the method is what's different.

Imagine if you will that the web server had access, but the user that 
Mixmaster is running as doesn't have access.  In such a (hypothetical) 
case, Mixmaster couldn't use direct files, but would be able to use a URL.

> The Web URL is just a symlink to the Echolot /results/ folder.

That speaks to file system permissions (web servers usually use other / 
world to access files) and implies that Mixmaster should be able to read 
the Echolot files directly.



-- 
Grant. . . .
unix || die
Re: Linux file permissions question
#310574
Author: Grant Taylor
Date: Sat, 05 Sep 2020 05:12
26 lines
2223 bytes
On 9/4/20 9:58 PM, Nomen Nescio wrote:
> You can put mix and echolot users in the same group, but then mix 
> user will be able not only read but also write files that belong to 
> echolot user. If you want more fine-tuned control you'll have to use 
> ACL (Access Control List). Just google "linux acl vs permissions."

I would actively discourage putting multiple users in the same group (or 
eachohter's groups) unless you have a specific reason to do so.  (I've 
not seen a reason yet in this thread.)

I strongly suspect you want to make sure that Echolot and Mixmaster 
can't meddle in each others files.

The only exception being that you want Mixmaster to be able to read 
specific files from Echolot.  There are multiple ways to accomplish this 
without commingling Echolot and Mixmaster.

One way that comes to mind is to have a cron job for Echolot that copies 
data files to a common location on the system.  Then have Mixmaster read 
those common files or copy them into a repository local to Mixmaster.



-- 
Grant. . . .
unix || die
Re: Linux file permissions question
#310582
Author: SEC3
Date: Sat, 05 Sep 2020 12:20
37 lines
2632 bytes
On 2020-09-05 1:12 a.m., Grant Taylor wrote:
> On 9/4/20 9:58 PM, Nomen Nescio wrote:
>> You can put mix and echolot users in the same group, but then mix user
>> will be able not only read but also write files that belong to echolot
>> user. If you want more fine-tuned control you'll have to use ACL
>> (Access Control List). Just google "linux acl vs permissions."
> 
> I would actively discourage putting multiple users in the same group (or
> eachohter's groups) unless you have a specific reason to do so.  (I've
> not seen a reason yet in this thread.)
> 
> I strongly suspect you want to make sure that Echolot and Mixmaster
> can't meddle in each others files.
> 
> The only exception being that you want Mixmaster to be able to read
> specific files from Echolot.  There are multiple ways to accomplish this
> without commingling Echolot and Mixmaster.
> 
> One way that comes to mind is to have a cron job for Echolot that copies
> data files to a common location on the system.  Then have Mixmaster read
> those common files or copy them into a repository local to Mixmaster.

Thanks, Grant, for all your help. As you've suggested in other messages
there should be no need to change ownership or permissions to accomplish
my goals.

I wish I could test this myself before advising Zip2 Admin. I operate
pingers and I operate Mixmaster remailers. But I don't operate both on
the same machine as Zip2 does.


--
SEC3

Contact information at <https://sec3.net>
I am also on Keybase <https://keybase.io/sec3>
YAMN Help <https://sec3.net/yamnhelp/>
Re: Linux file permissions question
#310589
Author: Grant Taylor
Date: Sat, 05 Sep 2020 18:47
17 lines
1655 bytes
On 9/5/20 6:20 AM, SEC3 wrote:
> Thanks, Grant, for all your help.

You're welcome.

> I wish I could test this myself before advising Zip2 Admin.  ...  But 
> I don't operate both on the same machine as Zip2 does.

Feel free to have Zip2 email me directly, or CC me into thread(s) with 
Zip2 (obviously with Zip2's consent), whatever works best for the two of 
you.



-- 
Grant. . . .
unix || die
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads