9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] werc comments egine
@ 2022-01-17  2:56 thinktankworkspaces
  2022-01-17  7:43 ` Kurt H Maier
  0 siblings, 1 reply; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-17  2:56 UTC (permalink / raw)
  To: 9front

So I added

conf_enable_comments
conf_enable_wiki

Also created a user will and added them to members admin. I 
can log in fine but I can't really post anything. 

Could not post comment due to internal error, sorry.

I see in the logs its some permission error. Any hints where? what?. I tried to manual creat the folder as that user


umask: '/usr/bin' does not exist
mkdir: can't create sites/cirno/_werc/comments/1642387681: 'sites/cirno/_werc/comments/1642387681' create -- in a non-directory
ERROR XXX: Could not create comment:  mkdir 71270: error
cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
Sun Jan 16 18:48:01 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
tee: cannot open /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
mv: can't stat /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
Auth: success
Sun Jan 16 18:48:01 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/


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

* Re: [9front] werc comments egine
  2022-01-17  2:56 [9front] werc comments egine thinktankworkspaces
@ 2022-01-17  7:43 ` Kurt H Maier
  2022-01-17 23:47   ` thinktankworkspaces
  0 siblings, 1 reply; 11+ messages in thread
From: Kurt H Maier @ 2022-01-17  7:43 UTC (permalink / raw)
  To: 9front

On Sun, Jan 16, 2022 at 06:56:41PM -0800, thinktankworkspaces@gmail.com wrote:
> So I added
> 
> conf_enable_comments
> conf_enable_wiki
> 
> Also created a user will and added them to members admin. I 
> can log in fine but I can't really post anything. 
> 
> Could not post comment due to internal error, sorry.
> 
> I see in the logs its some permission error. Any hints where? what?. I tried to manual creat the folder as that user
> 
> 
> umask: '/usr/bin' does not exist
> mkdir: can't create sites/cirno/_werc/comments/1642387681: 'sites/cirno/_werc/comments/1642387681' create -- in a non-directory
> ERROR XXX: Could not create comment:  mkdir 71270: error
> cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
> Sun Jan 16 18:48:01 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
> tee: cannot open /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
> mv: can't stat /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
> Auth: success
> Sun Jan 16 18:48:01 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
> 

The comments directory needs to be writeable as whatever system user
your web server runs under.

I don't know what that umask error is but I'd work it out before letting
the public access this installation.

khm

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

* Re: [9front] werc comments egine
  2022-01-17  7:43 ` Kurt H Maier
@ 2022-01-17 23:47   ` thinktankworkspaces
  2022-01-18  0:23     ` Stanley Lieber
  0 siblings, 1 reply; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-17 23:47 UTC (permalink / raw)
  To: 9front

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

So I deleted everything and started over. Its working now but I still ran into a few problems. 

So you need to log in in order to add a comment. When I log in I still get an error writing data. 

Auth: success
umask: '/bin/umask' directory entry not found
mkdir: can't create sites/cirno/_werc/comments: 'sites/cirno/_werc/comments' access permission denied
ERROR XXX: Could not create comment:  mkdir 57899: error
cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
Mon Jan 17 14:54:06 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
tee: cannot open /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
mv: can't stat /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
Auth: success
Mon Jan 17 14:54:07 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/

Not really sure why I get this error. The user www should have full access to everything. However I suspect
an issue with one of the files /bin/umask does not exist in plan9. So I did a grep to search for it
I found it in two areas. 

/usr/www/werc/apps/bridge/app.rc:88. I would comment it out
I also belive app.rc:91 is incorrect
I think app.rc:91 should be
mkdir -p $dir &&

Auth: success
sites/cirno/_werc/comments/1642460857/user: ./apps/bridge/app.rc:93: can't open: 'sites/cirno/_werc/comments' does not exist
Mon Jan 17 15:07:37 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/

I still got another error. I guess you need to create the directory 'comments' in sites/cirno/_werc/

so I had to manually run
mkdir -p comments while in sites/cirno/_werc/ directory and then run
chmod 777 comments

Not exactly happy about that but it works. 

Wiki is also another issue and required the following

mkdir -p sites/cirno/index.md_werc
chmod 777 index.md_werc
chmod 777 index.md

I also had to remove umask from apps/dirdir/app.rc

So two directories are 777 and one file. But now my other plan9 users can make changes not that I have
any users but this is kind of bad. 

[-- Attachment #2: Type: message/rfc822, Size: 5832 bytes --]

From: Kurt H Maier <khm@sciops.net>
To: 9front@9front.org
Subject: Re: [9front] werc comments egine
Date: Sun, 16 Jan 2022 23:43:50 -0800
Message-ID: <YeUeNicuNXe76BkR@wopr>

On Sun, Jan 16, 2022 at 06:56:41PM -0800, thinktankworkspaces@gmail.com wrote:
> So I added
> 
> conf_enable_comments
> conf_enable_wiki
> 
> Also created a user will and added them to members admin. I 
> can log in fine but I can't really post anything. 
> 
> Could not post comment due to internal error, sorry.
> 
> I see in the logs its some permission error. Any hints where? what?. I tried to manual creat the folder as that user
> 
> 
> umask: '/usr/bin' does not exist
> mkdir: can't create sites/cirno/_werc/comments/1642387681: 'sites/cirno/_werc/comments/1642387681' create -- in a non-directory
> ERROR XXX: Could not create comment:  mkdir 71270: error
> cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
> Sun Jan 16 18:48:01 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
> tee: cannot open /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
> mv: can't stat /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
> Auth: success
> Sun Jan 16 18:48:01 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
> 

The comments directory needs to be writeable as whatever system user
your web server runs under.

I don't know what that umask error is but I'd work it out before letting
the public access this installation.

khm

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

* Re: [9front] werc comments egine
  2022-01-17 23:47   ` thinktankworkspaces
@ 2022-01-18  0:23     ` Stanley Lieber
  2022-01-18  2:21       ` thinktankworkspaces
                         ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Stanley Lieber @ 2022-01-18  0:23 UTC (permalink / raw)
  To: 9front

On January 17, 2022 11:47:00 PM UTC, thinktankworkspaces@gmail.com wrote:
>So I deleted everything and started over. Its working now but I still ran into a few problems. 
>
>So you need to log in in order to add a comment. When I log in I still get an error writing data. 
>
>Auth: success
>umask: '/bin/umask' directory entry not found
>mkdir: can't create sites/cirno/_werc/comments: 'sites/cirno/_werc/comments' access permission denied
>ERROR XXX: Could not create comment:  mkdir 57899: error
>cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
>Mon Jan 17 14:54:06 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>tee: cannot open /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>mv: can't stat /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>Auth: success
>Mon Jan 17 14:54:07 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>Not really sure why I get this error. The user www should have full access to everything. However I suspect
>an issue with one of the files /bin/umask does not exist in plan9. So I did a grep to search for it
>I found it in two areas. 
>
>/usr/www/werc/apps/bridge/app.rc:88. I would comment it out
>I also belive app.rc:91 is incorrect
>I think app.rc:91 should be
>mkdir -p $dir &&
>
>Auth: success
>sites/cirno/_werc/comments/1642460857/user: ./apps/bridge/app.rc:93: can't open: 'sites/cirno/_werc/comments' does not exist
>Mon Jan 17 15:07:37 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>I still got another error. I guess you need to create the directory 'comments' in sites/cirno/_werc/
>
>so I had to manually run
>mkdir -p comments while in sites/cirno/_werc/ directory and then run
>chmod 777 comments
>
>Not exactly happy about that but it works. 
>
>Wiki is also another issue and required the following
>
>mkdir -p sites/cirno/index.md_werc
>chmod 777 index.md_werc
>chmod 777 index.md
>
>I also had to remove umask from apps/dirdir/app.rc
>
>So two directories are 777 and one file. But now my other plan9 users can make changes not that I have
>any users but this is kind of bad. 

sorry i haven't had time to look into this more closely yet, but i run all the werc apps on 9front under rc-httpd, and they all work without modification. most of the errors generated by missing unix commands can be safely ignored *if things are working*. werc was written on linux, and mostly assumes you are running some flavor of plan9port tools on a unix. i will have to look into apps/ further to see if some of these errors can be trimmed.

your errors about the missing directories indicate whatever user is executing werc (whomever rc-httpd is running as) does not have permission to create those missing directories, so is failing. how are you launching rc-httpd, exactly?

the path werc/sites/cirno also seems questionable. the directories under sites/ are meant to correspond to domain names.

sl

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

* Re: [9front] werc comments egine
  2022-01-18  0:23     ` Stanley Lieber
@ 2022-01-18  2:21       ` thinktankworkspaces
  2022-01-18  3:20       ` thinktankworkspaces
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-18  2:21 UTC (permalink / raw)
  To: 9front

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

Okay I might be confused here. I touched the file /rc/bin/rc-httpd and started editing the files
cpu% ls -l
d-rwxrwxr-x M 64 sys    sys    0 Feb  1  2021 handlers
--rwxrwxr-x M 64 sys    sys 2231 Oct  4  2019 rc-httpd
--rwxrwxr-x M 64 glenda sys  578 Jan 16 16:12 select-handler

So because I did that. It means glenda is managing everything?

and the service is

--rwxrwxr-x M 64 sys    sys  59 Oct  4  2019 tcp80

Honestly I don't recall changing any other files. Oh yes I don't have a domain yet. So I just picked
cirno. I'm not exactly creative here. 

[-- Attachment #2: Type: message/rfc822, Size: 6882 bytes --]

From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] werc comments egine
Date: Tue, 18 Jan 2022 00:23:11 +0000
Message-ID: <4C3A2C43-2475-4B7C-9BF1-B8C01D38680E@stanleylieber.com>

On January 17, 2022 11:47:00 PM UTC, thinktankworkspaces@gmail.com wrote:
>So I deleted everything and started over. Its working now but I still ran into a few problems. 
>
>So you need to log in in order to add a comment. When I log in I still get an error writing data. 
>
>Auth: success
>umask: '/bin/umask' directory entry not found
>mkdir: can't create sites/cirno/_werc/comments: 'sites/cirno/_werc/comments' access permission denied
>ERROR XXX: Could not create comment:  mkdir 57899: error
>cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
>Mon Jan 17 14:54:06 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>tee: cannot open /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>mv: can't stat /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>Auth: success
>Mon Jan 17 14:54:07 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>Not really sure why I get this error. The user www should have full access to everything. However I suspect
>an issue with one of the files /bin/umask does not exist in plan9. So I did a grep to search for it
>I found it in two areas. 
>
>/usr/www/werc/apps/bridge/app.rc:88. I would comment it out
>I also belive app.rc:91 is incorrect
>I think app.rc:91 should be
>mkdir -p $dir &&
>
>Auth: success
>sites/cirno/_werc/comments/1642460857/user: ./apps/bridge/app.rc:93: can't open: 'sites/cirno/_werc/comments' does not exist
>Mon Jan 17 15:07:37 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>I still got another error. I guess you need to create the directory 'comments' in sites/cirno/_werc/
>
>so I had to manually run
>mkdir -p comments while in sites/cirno/_werc/ directory and then run
>chmod 777 comments
>
>Not exactly happy about that but it works. 
>
>Wiki is also another issue and required the following
>
>mkdir -p sites/cirno/index.md_werc
>chmod 777 index.md_werc
>chmod 777 index.md
>
>I also had to remove umask from apps/dirdir/app.rc
>
>So two directories are 777 and one file. But now my other plan9 users can make changes not that I have
>any users but this is kind of bad. 

sorry i haven't had time to look into this more closely yet, but i run all the werc apps on 9front under rc-httpd, and they all work without modification. most of the errors generated by missing unix commands can be safely ignored *if things are working*. werc was written on linux, and mostly assumes you are running some flavor of plan9port tools on a unix. i will have to look into apps/ further to see if some of these errors can be trimmed.

your errors about the missing directories indicate whatever user is executing werc (whomever rc-httpd is running as) does not have permission to create those missing directories, so is failing. how are you launching rc-httpd, exactly?

the path werc/sites/cirno also seems questionable. the directories under sites/ are meant to correspond to domain names.

sl

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

* Re: [9front] werc comments egine
  2022-01-18  0:23     ` Stanley Lieber
  2022-01-18  2:21       ` thinktankworkspaces
@ 2022-01-18  3:20       ` thinktankworkspaces
  2022-01-18  5:06         ` Stanley Lieber
  2022-01-18  3:20       ` thinktankworkspaces
  2022-01-18  7:27       ` thinktankworkspaces
  3 siblings, 1 reply; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-18  3:20 UTC (permalink / raw)
  To: 9front

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

Okay thinking about this. I guess /rc/bin/cpurc has a line

	# cpu+auth server
	auth/keyfs -wp -m /mnt/keys /adm/keys
	aux/listen -q -t /rc/bin/service.auth -d $serviced tcp

Which I guess points to tcp services or /rc/bin/services

cpu% cat tcp80
#!/bin/rc
exec /rc/bin/rc-httpd/rc-httpd >>[2]/sys/log/www
cpu% 

So how do I get the user to run this. Do I just pull it out of cpurc and add it to /usr/www/lib/profile or
clearly i'm confused?

I guess I always drawterm and log in as glenda the run rcpu -u www. So I should do that
and manually run 

aux/listen -q -t /rc/bin/service.auth -d $serviced tcp

[-- Attachment #2: Type: message/rfc822, Size: 6882 bytes --]

From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] werc comments egine
Date: Tue, 18 Jan 2022 00:23:11 +0000
Message-ID: <4C3A2C43-2475-4B7C-9BF1-B8C01D38680E@stanleylieber.com>

On January 17, 2022 11:47:00 PM UTC, thinktankworkspaces@gmail.com wrote:
>So I deleted everything and started over. Its working now but I still ran into a few problems. 
>
>So you need to log in in order to add a comment. When I log in I still get an error writing data. 
>
>Auth: success
>umask: '/bin/umask' directory entry not found
>mkdir: can't create sites/cirno/_werc/comments: 'sites/cirno/_werc/comments' access permission denied
>ERROR XXX: Could not create comment:  mkdir 57899: error
>cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
>Mon Jan 17 14:54:06 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>tee: cannot open /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>mv: can't stat /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>Auth: success
>Mon Jan 17 14:54:07 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>Not really sure why I get this error. The user www should have full access to everything. However I suspect
>an issue with one of the files /bin/umask does not exist in plan9. So I did a grep to search for it
>I found it in two areas. 
>
>/usr/www/werc/apps/bridge/app.rc:88. I would comment it out
>I also belive app.rc:91 is incorrect
>I think app.rc:91 should be
>mkdir -p $dir &&
>
>Auth: success
>sites/cirno/_werc/comments/1642460857/user: ./apps/bridge/app.rc:93: can't open: 'sites/cirno/_werc/comments' does not exist
>Mon Jan 17 15:07:37 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>I still got another error. I guess you need to create the directory 'comments' in sites/cirno/_werc/
>
>so I had to manually run
>mkdir -p comments while in sites/cirno/_werc/ directory and then run
>chmod 777 comments
>
>Not exactly happy about that but it works. 
>
>Wiki is also another issue and required the following
>
>mkdir -p sites/cirno/index.md_werc
>chmod 777 index.md_werc
>chmod 777 index.md
>
>I also had to remove umask from apps/dirdir/app.rc
>
>So two directories are 777 and one file. But now my other plan9 users can make changes not that I have
>any users but this is kind of bad. 

sorry i haven't had time to look into this more closely yet, but i run all the werc apps on 9front under rc-httpd, and they all work without modification. most of the errors generated by missing unix commands can be safely ignored *if things are working*. werc was written on linux, and mostly assumes you are running some flavor of plan9port tools on a unix. i will have to look into apps/ further to see if some of these errors can be trimmed.

your errors about the missing directories indicate whatever user is executing werc (whomever rc-httpd is running as) does not have permission to create those missing directories, so is failing. how are you launching rc-httpd, exactly?

the path werc/sites/cirno also seems questionable. the directories under sites/ are meant to correspond to domain names.

sl

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

* Re: [9front] werc comments egine
  2022-01-18  0:23     ` Stanley Lieber
  2022-01-18  2:21       ` thinktankworkspaces
  2022-01-18  3:20       ` thinktankworkspaces
@ 2022-01-18  3:20       ` thinktankworkspaces
  2022-01-18  7:27       ` thinktankworkspaces
  3 siblings, 0 replies; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-18  3:20 UTC (permalink / raw)
  To: 9front

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

Okay thinking about this. I guess /rc/bin/cpurc has a line

	# cpu+auth server
	auth/keyfs -wp -m /mnt/keys /adm/keys
	aux/listen -q -t /rc/bin/service.auth -d $serviced tcp

Which I guess points to tcp services or /rc/bin/services

cpu% cat tcp80
#!/bin/rc
exec /rc/bin/rc-httpd/rc-httpd >>[2]/sys/log/www
cpu% 

So how do I get the user to run this. Do I just pull it out of cpurc and add it to /usr/www/lib/profile or
clearly i'm confused?

I guess I always drawterm and log in as glenda the run rcpu -u www. So I should do that
and manually run 

aux/listen -q -t /rc/bin/service.auth -d $serviced tcp

[-- Attachment #2: Type: message/rfc822, Size: 6882 bytes --]

From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] werc comments egine
Date: Tue, 18 Jan 2022 00:23:11 +0000
Message-ID: <4C3A2C43-2475-4B7C-9BF1-B8C01D38680E@stanleylieber.com>

On January 17, 2022 11:47:00 PM UTC, thinktankworkspaces@gmail.com wrote:
>So I deleted everything and started over. Its working now but I still ran into a few problems. 
>
>So you need to log in in order to add a comment. When I log in I still get an error writing data. 
>
>Auth: success
>umask: '/bin/umask' directory entry not found
>mkdir: can't create sites/cirno/_werc/comments: 'sites/cirno/_werc/comments' access permission denied
>ERROR XXX: Could not create comment:  mkdir 57899: error
>cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
>Mon Jan 17 14:54:06 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>tee: cannot open /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>mv: can't stat /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>Auth: success
>Mon Jan 17 14:54:07 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>Not really sure why I get this error. The user www should have full access to everything. However I suspect
>an issue with one of the files /bin/umask does not exist in plan9. So I did a grep to search for it
>I found it in two areas. 
>
>/usr/www/werc/apps/bridge/app.rc:88. I would comment it out
>I also belive app.rc:91 is incorrect
>I think app.rc:91 should be
>mkdir -p $dir &&
>
>Auth: success
>sites/cirno/_werc/comments/1642460857/user: ./apps/bridge/app.rc:93: can't open: 'sites/cirno/_werc/comments' does not exist
>Mon Jan 17 15:07:37 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>I still got another error. I guess you need to create the directory 'comments' in sites/cirno/_werc/
>
>so I had to manually run
>mkdir -p comments while in sites/cirno/_werc/ directory and then run
>chmod 777 comments
>
>Not exactly happy about that but it works. 
>
>Wiki is also another issue and required the following
>
>mkdir -p sites/cirno/index.md_werc
>chmod 777 index.md_werc
>chmod 777 index.md
>
>I also had to remove umask from apps/dirdir/app.rc
>
>So two directories are 777 and one file. But now my other plan9 users can make changes not that I have
>any users but this is kind of bad. 

sorry i haven't had time to look into this more closely yet, but i run all the werc apps on 9front under rc-httpd, and they all work without modification. most of the errors generated by missing unix commands can be safely ignored *if things are working*. werc was written on linux, and mostly assumes you are running some flavor of plan9port tools on a unix. i will have to look into apps/ further to see if some of these errors can be trimmed.

your errors about the missing directories indicate whatever user is executing werc (whomever rc-httpd is running as) does not have permission to create those missing directories, so is failing. how are you launching rc-httpd, exactly?

the path werc/sites/cirno also seems questionable. the directories under sites/ are meant to correspond to domain names.

sl

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

* Re: [9front] werc comments egine
  2022-01-18  3:20       ` thinktankworkspaces
@ 2022-01-18  5:06         ` Stanley Lieber
  2022-01-18  8:13           ` thinktankworkspaces
  0 siblings, 1 reply; 11+ messages in thread
From: Stanley Lieber @ 2022-01-18  5:06 UTC (permalink / raw)
  To: 9front

On January 18, 2022 3:20:34 AM UTC, thinktankworkspaces@gmail.com wrote:
>Okay thinking about this. I guess /rc/bin/cpurc has a line
>
>	# cpu+auth server
>	auth/keyfs -wp -m /mnt/keys /adm/keys
>	aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
>
>Which I guess points to tcp services or /rc/bin/services
>
>cpu% cat tcp80
>#!/bin/rc
>exec /rc/bin/rc-httpd/rc-httpd >>[2]/sys/log/www
>cpu% 
>
>So how do I get the user to run this. Do I just pull it out of cpurc and add it to /usr/www/lib/profile or
>clearly i'm confused?
>
>I guess I always drawterm and log in as glenda the run rcpu -u www. So I should do that
>and manually run 
>
>aux/listen -q -t /rc/bin/service.auth -d $serviced tcp

when you boot the system, $user is the hostowner, which refers to the owner of the kernel process. the hostowner ends up owning the disk file server process, as well, but the disk file server programs don't provide any automatic mechanism for violating disk file permissions without writing code or abusing the system's running processes with a special tool such as acid(1).

disk file permissions are completely separate from kernel process permissions, and are controlled by the disk file server process (cwfs or hjfs). by convention, plan 9 arranges for the kernel, auth, and disk file server to honor matching usernames, even though technically they're separate entities.

it looks like your system is running rc-httpd via a tcp80 script launched by the default listen(8) process, which ends up being owned by the special user none, rather than your chosen user www.

here's what i do for 9front.org:

first, move the /rc/bin/services/tcp80 script into /cfg/$sysname/service.www/

then add the following to /cfg/$sysname/cpustart:

auth/as www aux/listen -p 128 -t /cfg/$sysname/service.www

when you reboot, this will start a listener running as user www on the directory /cfg/$sysname/service.www/, and any listener script you put in there will in turn be run as user www.

sl

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

* Re: [9front] werc comments egine
  2022-01-18  0:23     ` Stanley Lieber
                         ` (2 preceding siblings ...)
  2022-01-18  3:20       ` thinktankworkspaces
@ 2022-01-18  7:27       ` thinktankworkspaces
  3 siblings, 0 replies; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-18  7:27 UTC (permalink / raw)
  To: 9front

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

I started over again this time I made sure of a few things. 

mv /rc/bin/service/tcp80 /rc/bin/service/!tcp80
cp /rc/bin/service/!tcp80 /usr/www/bin/service/tcp80

rcpu -u www
log in with password. 

mothra http://172.27.0.67
nothing

aux/listen -d /usr/www/bin/service tcp

mothra http://172.27.0.67
site comes up fine

So now I'm explicit in making sure only www runs that service

I still ran into the same issues. 
mkdir -p comments
chmod +wx comments

mkdir -p sites/cirno/index.md_werc
chmod +wx index.md_werc
chmod +wx index.md

After that everything works!

[-- Attachment #2: Type: message/rfc822, Size: 6882 bytes --]

From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] werc comments egine
Date: Tue, 18 Jan 2022 00:23:11 +0000
Message-ID: <4C3A2C43-2475-4B7C-9BF1-B8C01D38680E@stanleylieber.com>

On January 17, 2022 11:47:00 PM UTC, thinktankworkspaces@gmail.com wrote:
>So I deleted everything and started over. Its working now but I still ran into a few problems. 
>
>So you need to log in in order to add a comment. When I log in I still get an error writing data. 
>
>Auth: success
>umask: '/bin/umask' directory entry not found
>mkdir: can't create sites/cirno/_werc/comments: 'sites/cirno/_werc/comments' access permission denied
>ERROR XXX: Could not create comment:  mkdir 57899: error
>cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
>Mon Jan 17 14:54:06 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>tee: cannot open /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>mv: can't stat /tmp/fltr_cache/8abfe6173693d0f2edb5404b78cd9aa804db02d6/57917: '/tmp/fltr_cache' does not exist
>Auth: success
>Mon Jan 17 14:54:07 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>Not really sure why I get this error. The user www should have full access to everything. However I suspect
>an issue with one of the files /bin/umask does not exist in plan9. So I did a grep to search for it
>I found it in two areas. 
>
>/usr/www/werc/apps/bridge/app.rc:88. I would comment it out
>I also belive app.rc:91 is incorrect
>I think app.rc:91 should be
>mkdir -p $dir &&
>
>Auth: success
>sites/cirno/_werc/comments/1642460857/user: ./apps/bridge/app.rc:93: can't open: 'sites/cirno/_werc/comments' does not exist
>Mon Jan 17 15:07:37 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
>
>I still got another error. I guess you need to create the directory 'comments' in sites/cirno/_werc/
>
>so I had to manually run
>mkdir -p comments while in sites/cirno/_werc/ directory and then run
>chmod 777 comments
>
>Not exactly happy about that but it works. 
>
>Wiki is also another issue and required the following
>
>mkdir -p sites/cirno/index.md_werc
>chmod 777 index.md_werc
>chmod 777 index.md
>
>I also had to remove umask from apps/dirdir/app.rc
>
>So two directories are 777 and one file. But now my other plan9 users can make changes not that I have
>any users but this is kind of bad. 

sorry i haven't had time to look into this more closely yet, but i run all the werc apps on 9front under rc-httpd, and they all work without modification. most of the errors generated by missing unix commands can be safely ignored *if things are working*. werc was written on linux, and mostly assumes you are running some flavor of plan9port tools on a unix. i will have to look into apps/ further to see if some of these errors can be trimmed.

your errors about the missing directories indicate whatever user is executing werc (whomever rc-httpd is running as) does not have permission to create those missing directories, so is failing. how are you launching rc-httpd, exactly?

the path werc/sites/cirno also seems questionable. the directories under sites/ are meant to correspond to domain names.

sl

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

* Re: [9front] werc comments egine
  2022-01-18  5:06         ` Stanley Lieber
@ 2022-01-18  8:13           ` thinktankworkspaces
  0 siblings, 0 replies; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-18  8:13 UTC (permalink / raw)
  To: 9front

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

Wow! sl...I just learned a ton in this response from you. Its working default now. I removed my
777 directories and files to make sure it creates comments folder and comments automatic. 
Wiki is working also. Thanks a bunch. It seems i'm not really making the best use of this 
OS or I'm making too many false assumptions.

And the werc is really impresive even if I barely know how to use it. 

Regards

[-- Attachment #2: Type: message/rfc822, Size: 5203 bytes --]

From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] werc comments egine
Date: Tue, 18 Jan 2022 05:06:41 +0000
Message-ID: <51605C26-36E6-4AB4-AF20-6761E2C389F3@stanleylieber.com>

On January 18, 2022 3:20:34 AM UTC, thinktankworkspaces@gmail.com wrote:
>Okay thinking about this. I guess /rc/bin/cpurc has a line
>
>	# cpu+auth server
>	auth/keyfs -wp -m /mnt/keys /adm/keys
>	aux/listen -q -t /rc/bin/service.auth -d $serviced tcp
>
>Which I guess points to tcp services or /rc/bin/services
>
>cpu% cat tcp80
>#!/bin/rc
>exec /rc/bin/rc-httpd/rc-httpd >>[2]/sys/log/www
>cpu% 
>
>So how do I get the user to run this. Do I just pull it out of cpurc and add it to /usr/www/lib/profile or
>clearly i'm confused?
>
>I guess I always drawterm and log in as glenda the run rcpu -u www. So I should do that
>and manually run 
>
>aux/listen -q -t /rc/bin/service.auth -d $serviced tcp

when you boot the system, $user is the hostowner, which refers to the owner of the kernel process. the hostowner ends up owning the disk file server process, as well, but the disk file server programs don't provide any automatic mechanism for violating disk file permissions without writing code or abusing the system's running processes with a special tool such as acid(1).

disk file permissions are completely separate from kernel process permissions, and are controlled by the disk file server process (cwfs or hjfs). by convention, plan 9 arranges for the kernel, auth, and disk file server to honor matching usernames, even though technically they're separate entities.

it looks like your system is running rc-httpd via a tcp80 script launched by the default listen(8) process, which ends up being owned by the special user none, rather than your chosen user www.

here's what i do for 9front.org:

first, move the /rc/bin/services/tcp80 script into /cfg/$sysname/service.www/

then add the following to /cfg/$sysname/cpustart:

auth/as www aux/listen -p 128 -t /cfg/$sysname/service.www

when you reboot, this will start a listener running as user www on the directory /cfg/$sysname/service.www/, and any listener script you put in there will in turn be run as user www.

sl

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

* Re: [9front] werc comments egine
@ 2022-01-17  9:07 thinktankworkspaces
  0 siblings, 0 replies; 11+ messages in thread
From: thinktankworkspaces @ 2022-01-17  9:07 UTC (permalink / raw)
  To: khm, 9front

On Sun, Jan 16, 2022 at 06:56:41PM -0800, thinktankworkspaces@gmail.com wrote:
> So I added
> 
> conf_enable_comments
> conf_enable_wiki
> 
> Also created a user will and added them to members admin. I 
> can log in fine but I can't really post anything. 
> 
> Could not post comment due to internal error, sorry.
> 
> I see in the logs its some permission error. Any hints where? what?. I tried to manual creat the folder as that user
> 
> 
> umask: '/usr/bin' does not exist
> mkdir: can't create sites/cirno/_werc/comments/1642387681: 'sites/cirno/_werc/comments/1642387681' create -- in a non-directory
> ERROR XXX: Could not create comment:  mkdir 71270: error
> cirno/ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 - POST - md_handler sites/cirno/index.md - lib/default_master.tpl
> Sun Jan 16 18:48:01 PST 2022 :: cirno :: POST / HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
> tee: cannot open /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
> mv: can't stat /tmp/fltr_cache/923e12ff215b0e44105268bcdd2950bffec9fc41/71285: '/tmp/fltr_cache' does not exist
> Auth: success
> Sun Jan 16 18:48:01 PST 2022 :: cirno :: GET /pub/style/style.css HTTP/1.1 :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15 :: 200 :: http://cirno/
> 

The comments directory needs to be writeable as whatever system user
your web server runs under.

I don't know what that umask error is but I'd work it out before letting
the public access this installation.

khm



Yes this seems kind of silly. I have created a user called www and as that user ran webfs. 
I did an hg pull to get werc installed as user www. 
I have changed select /rc/bin/rc-httpd/select-handler. I can 
log in fine. However as that user It seems I need to run bind -a /bin /usr/bin to get access
to other utilities. 

my line 21 is as follows for /usr/www/wer/etc/initrc
path=(. ./bin ./bin/contrib /bin /usr/bin)

Not sure why umask is needed when it doesn't exist in 9front. I'm not sure how to make 
everything writable as that user. There is no recursive chmod -R. Instead I manually 
went to every directory and every file and typed chmod 777 on everything. Which is dumb 
but I'm kind of at a loss. And no this is definitely not public website yet. 


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

end of thread, other threads:[~2022-01-18 10:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17  2:56 [9front] werc comments egine thinktankworkspaces
2022-01-17  7:43 ` Kurt H Maier
2022-01-17 23:47   ` thinktankworkspaces
2022-01-18  0:23     ` Stanley Lieber
2022-01-18  2:21       ` thinktankworkspaces
2022-01-18  3:20       ` thinktankworkspaces
2022-01-18  5:06         ` Stanley Lieber
2022-01-18  8:13           ` thinktankworkspaces
2022-01-18  3:20       ` thinktankworkspaces
2022-01-18  7:27       ` thinktankworkspaces
2022-01-17  9:07 thinktankworkspaces

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).