05-19-2020, 12:32 AM
(This post was last modified: 05-19-2020, 12:36 AM by FordSubmariner.)
Thanks again Celton, and thank you remkonoteboom.
This has all been very helpful to me.
I now think that I was mistaken when I earlier posted that tactic_paths.py was not where it should be. Yesterday I think I forgot to run updatedb after installing TACTIC and so was looking at the output from locate which had been based on a minutes-earlier run of updatedb because locate now (after updatedb ran it's cron daily run last night I guess) shows me the location that tactic_paths.py was installed: /usr/lib/python3/dist-packages/tacticenv/tactic_paths.py
remkonoteboom, your suggestion to import tacticenv in a python3 console helped me find it, so thank you for that.
In this Ubuntu instance, the user running apache is "www-data".
The TACTIC install.py seems to have defaulted to an install location of /home/apache (I don't think that's where most apache2 document trees are located) and that's ok with me. The TACTIC install.py seems to have figured out that "www-data" is the user running apache in this distro, and all directories and files under /home/apache are owned by "www-data".
When I earlier mentioned the browser console log having a problem loading the script "http://x.x.x/context/spt_js/chart/utils.js?ver=4.7.0.b02", I now think (thanks again to remkonoteboom's guidance) that this script must be /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js and every file and directory in the path I list here is owned by "www-data":
-rw-rw-r-- 1 www-data root 3318 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js
drwxrwxr-x 2 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart
drwxrwxr-x 11 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src/context
drwxrwxr-x 16 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src
drwxrwxr-x 5 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02
And I'm launching startup_dev.py as that same "www-data" user. But I seem to recall reading yesterday that there is a separate "TACTIC" user? Or am I recalling incorrectly on this?
Celton and remkonoteboom, I tried your suggestion of trying to access a URL like "http://x.x.x/context/spt_js/chart/utils.js?ver=4.7.0.b02" from the browser console, and as you predicted, that failed. When I tried, I saw a "You don't have permission to access this resource." and now I see that the title of that new (error) page is "403 Forbidden". Celton, I guess that's what you meant by 403? Sorry if I was slow to pick up on that.
But I don't understand why it's forbidden because I'm running startup_dev.py as "www-data" and /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js is owned by "www-data" and with file metadata listing "rw" permissions for the file owner. I'm thinking it must be an apache configuration problem?
remkonoteboom, your point that "The following lines give this permission to apache:" and your listing the lines from tactic.conf was helpful to me because I looked in /opt/tactic/tactic for context/spt_js/chart/utils.js and it's not there. So based on that, I changed:
<Directory "/opt/tactic/tactic" >
to
<Directory "/home/apache/tactic" >
because that's where I find /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js (/home/apache/tactic is a SymLink pointing to /home/apache/tactic_src_4.7.0.b02 )
I then reloaded my apache configuration:
sudo systemctl reload apache2
and tried everything again. I still see the same TACTIC UI I reported before, and the 403 errors are still there when I attempt to access them from the browser console. At first I was thinking that perhaps the browser had cached those 403 error pages, so I used <shift>-reload-page to try and bypass any browser cache, but still, I get the same 403 error pages.
I then even tried restarting my apache2 server:
sudo systemctl restart apache2
And it's still doing the same thing.
There is also the section of tactic.conf:
<Directory "/opt/tactic/assets" >
Options FollowSymLinks
AllowOverride None
# Apache < 2.4
#Order Allow,Deny
#Allow from All
# Apache 2.4
Require all granted
</Directory>
And this directory "/opt/tactic/assets" was (before I changed it moments ago) initially owned by root:
$ ls -l /opt/tactic
total 8
drwxr-xr-x 2 root root 4096 May 17 18:44 assets
But when I found that, I changed its owner to www-data (even though it's empty) just in case, and reloaded my apache configuration. It's still doing the same thing.
Any other ideas? I really appreciate all the help and I'm still keen to get this up and running and confident that I'll find the problem soon.
Many thanks again for all the suggestions!
This has all been very helpful to me.
I now think that I was mistaken when I earlier posted that tactic_paths.py was not where it should be. Yesterday I think I forgot to run updatedb after installing TACTIC and so was looking at the output from locate which had been based on a minutes-earlier run of updatedb because locate now (after updatedb ran it's cron daily run last night I guess) shows me the location that tactic_paths.py was installed: /usr/lib/python3/dist-packages/tacticenv/tactic_paths.py
remkonoteboom, your suggestion to import tacticenv in a python3 console helped me find it, so thank you for that.
In this Ubuntu instance, the user running apache is "www-data".
The TACTIC install.py seems to have defaulted to an install location of /home/apache (I don't think that's where most apache2 document trees are located) and that's ok with me. The TACTIC install.py seems to have figured out that "www-data" is the user running apache in this distro, and all directories and files under /home/apache are owned by "www-data".
When I earlier mentioned the browser console log having a problem loading the script "http://x.x.x/context/spt_js/chart/utils.js?ver=4.7.0.b02", I now think (thanks again to remkonoteboom's guidance) that this script must be /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js and every file and directory in the path I list here is owned by "www-data":
-rw-rw-r-- 1 www-data root 3318 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js
drwxrwxr-x 2 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart
drwxrwxr-x 11 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src/context
drwxrwxr-x 16 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02/src
drwxrwxr-x 5 www-data root 4096 Dec 5 18:47 /home/apache/tactic_src_4.7.0.b02
And I'm launching startup_dev.py as that same "www-data" user. But I seem to recall reading yesterday that there is a separate "TACTIC" user? Or am I recalling incorrectly on this?
Celton and remkonoteboom, I tried your suggestion of trying to access a URL like "http://x.x.x/context/spt_js/chart/utils.js?ver=4.7.0.b02" from the browser console, and as you predicted, that failed. When I tried, I saw a "You don't have permission to access this resource." and now I see that the title of that new (error) page is "403 Forbidden". Celton, I guess that's what you meant by 403? Sorry if I was slow to pick up on that.
But I don't understand why it's forbidden because I'm running startup_dev.py as "www-data" and /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js is owned by "www-data" and with file metadata listing "rw" permissions for the file owner. I'm thinking it must be an apache configuration problem?
remkonoteboom, your point that "The following lines give this permission to apache:" and your listing the lines from tactic.conf was helpful to me because I looked in /opt/tactic/tactic for context/spt_js/chart/utils.js and it's not there. So based on that, I changed:
<Directory "/opt/tactic/tactic" >
to
<Directory "/home/apache/tactic" >
because that's where I find /home/apache/tactic_src_4.7.0.b02/src/context/spt_js/chart/utils.js (/home/apache/tactic is a SymLink pointing to /home/apache/tactic_src_4.7.0.b02 )
I then reloaded my apache configuration:
sudo systemctl reload apache2
and tried everything again. I still see the same TACTIC UI I reported before, and the 403 errors are still there when I attempt to access them from the browser console. At first I was thinking that perhaps the browser had cached those 403 error pages, so I used <shift>-reload-page to try and bypass any browser cache, but still, I get the same 403 error pages.
I then even tried restarting my apache2 server:
sudo systemctl restart apache2
And it's still doing the same thing.
There is also the section of tactic.conf:
<Directory "/opt/tactic/assets" >
Options FollowSymLinks
AllowOverride None
# Apache < 2.4
#Order Allow,Deny
#Allow from All
# Apache 2.4
Require all granted
</Directory>
And this directory "/opt/tactic/assets" was (before I changed it moments ago) initially owned by root:
$ ls -l /opt/tactic
total 8
drwxr-xr-x 2 root root 4096 May 17 18:44 assets
But when I found that, I changed its owner to www-data (even though it's empty) just in case, and reloaded my apache configuration. It's still doing the same thing.
Any other ideas? I really appreciate all the help and I'm still keen to get this up and running and confident that I'll find the problem soon.
Many thanks again for all the suggestions!