Include /path/myapache/myapache.conf
It seems to find a synatx error in my fully qualified path to my config
file which has wide open permissions (using as local server only).
# systemctl start apache2.service
Job for apache2.service failed because the control
process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu
apache2.service" for details.
# systemctl status apache2.service
httpd-prefork: Syntax error in -C/-c directive: Syntax error on line 2
of /etc/apache2/sysconfig.d/include.conf: Could not open configuration
file /path/myapache/myapache.conf: Permission denied
/etc/apache2/sysconfig.d/include.conf
# File generated from /etc/sysconfig/apache2, do not edit. Edit the sysconfig file instead.
Include /path/myapache/myapache.conf
It seems to find a synatx error in my fully qualified path to my configrun the following oneline (everything in the same line, just replace the
file which has wide open permissions (using as local server only).
What am I missing?
On 12/05/2026 04.44, bad sector wrote:
# systemctl start apache2.servicerun the following oneline (everything in the same line, just replace the path with the real one)
Job for apache2.service failed because the control
process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu
apache2.service" for details.
# systemctl status apache2.service
httpd-prefork: Syntax error in -C/-c directive: Syntax error on line 2
of /etc/apache2/sysconfig.d/include.conf: Could not open configuration
file /path/myapache/myapache.conf: Permission denied
/etc/apache2/sysconfig.d/include.conf
# File generated from /etc/sysconfig/apache2, do not edit. Edit the
sysconfig file instead.
Include /path/myapache/myapache.conf
It seems to find a synatx error in my fully qualified path to my
config file which has wide open permissions (using as local server only).
What am I missing?
apconf_path=/path/myapache/myapache.conf; while [ "$apconf_path" !=
"/" ]; do ls -ld "$apconf_path"; apconf_path=$(dirname "$apconf_path"); done;
the result could look something like:
-rw-r----- 1 user user 47 Jan 21-a 2025 /path/myapache/myapache.conf drwxr-xr-x 1 user user 114 Apr 14 11:08 /path/myapache
drwxr-xr-x 1 root root 6044 May 15 21:16 /path
the wwwrun user should have access to go into each directory, so all of
them needs to be x, the file itself needs to be r for the wwwrun user.
There is few options:
1. on all directories in the path "chmod o+x /path/to/dir" and the file itself "chmod o+r /path/myapache/myapache.conf"
2. You change the group to wwwrun and ensure that the paths all parts
has g+x for directories and g+r for the file itself.
3. You make wwwrun to be member of your user group.
The "simplest" is option 1.
On 2026-05-12 08:43, J.O. Aho wrote:
On 12/05/2026 04.44, bad sector wrote:
You also need to look at apparmor or selinux.httpd-prefork: Syntax error in -C/-c directive: Syntax error on line
2 of /etc/apache2/sysconfig.d/include.conf: Could not open
configuration file /path/myapache/myapache.conf: Permission denied
There is few options:
1. on all directories in the path "chmod o+x /path/to/dir" and the
file itself "chmod o+r /path/myapache/myapache.conf"
The "simplest" is option 1.
On 12/05/2026 10.35, Carlos E.R. wrote:
On 2026-05-12 08:43, J.O. Aho wrote:
On 12/05/2026 04.44, bad sector wrote:
You also need to look at apparmor or selinux.httpd-prefork: Syntax error in -C/-c directive: Syntax error on line
2 of /etc/apache2/sysconfig.d/include.conf: Could not open
configuration file /path/myapache/myapache.conf: Permission denied
There is few options:
1. on all directories in the path "chmod o+x /path/to/dir" and the
file itself "chmod o+r /path/myapache/myapache.conf"
The "simplest" is option 1.
That can be an issue too, that is simplest to detect to look at in the
audit log
grep '/path/myapache/myapache.conf' /var/log/audit.log
or
grep '/path/myapache/myapache.conf' /var/log/audit/audit.log
depending on the location of the log file. Look for something like
DENIED in the rows that matches to the search, if so, then you need to
take a look at apparmor/selinux documentation how to allow access to the file.
On 12/05/2026 04.44, bad sector wrote:
# systemctl start apache2.servicerun the following oneline (everything in the same line, just replace the path with the real one)
Job for apache2.service failed because the control
process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu
apache2.service" for details.
# systemctl status apache2.service
httpd-prefork: Syntax error in -C/-c directive: Syntax error on line 2
of /etc/apache2/sysconfig.d/include.conf: Could not open configuration
file /path/myapache/myapache.conf: Permission denied
/etc/apache2/sysconfig.d/include.conf
# File generated from /etc/sysconfig/apache2, do not edit. Edit the
sysconfig file instead.
Include /path/myapache/myapache.conf
It seems to find a synatx error in my fully qualified path to my
config file which has wide open permissions (using as local server only).
What am I missing?
apconf_path=/path/myapache/myapache.conf; while [ "$apconf_path" !=
"/" ]; do ls -ld "$apconf_path"; apconf_path=$(dirname "$apconf_path"); done;
the result could look something like:
-rw-r----- 1 user user 47 Jan 21-a 2025 /path/myapache/myapache.conf drwxr-xr-x 1 user user 114 Apr 14 11:08 /path/myapache
drwxr-xr-x 1 root root 6044 May 15 21:16 /path
the wwwrun user should have access to go into each directory, so all of
them needs to be x, the file itself needs to be r for the wwwrun user.
There is few options:
1. on all directories in the path "chmod o+x /path/to/dir" and the file itself "chmod o+r /path/myapache/myapache.conf"
2. You change the group to wwwrun and ensure that the paths all parts
has g+x for directories and g+r for the file itself.
3. You make wwwrun to be member of your user group.
The "simplest" is option 1.
On Mon, 11 May 2026 22:44:25 -0400, bad sector wrote:
Include /path/myapache/myapache.conf
It seems to find a synatx error in my fully qualified path to my config
file which has wide open permissions (using as local server only).
Do all components of the path have suitable permissions?
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
On 13/05/2026 03.04, bad sector wrote:
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
This is a blocker, only u3 is allowed, chmod so others can access it.
On 13/05/2026 03.04, bad sector wrote:Even if u3 is the user trying to access it? It's the only user in fact,
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
This is a blocker, only u3 is allowed, chmod so others can access it.
On 5/13/26 2:01 AM, J.O. Aho wrote:
On 13/05/2026 03.04, bad sector wrote:
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
This is a blocker, only u3 is allowed, chmod so others can access
it.
Even if u3 is the user trying to access it? It's the only user in
fact, there are others but they're always on their windows and apples instead.
bad sector <forgetski@_INVALID.net> writes:
On 5/13/26 2:01 AM, J.O. Aho wrote:
On 13/05/2026 03.04, bad sector wrote:
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
This is a blocker, only u3 is allowed, chmod so others can access
it.
Even if u3 is the user trying to access it? It's the only user in
fact, there are others but they're always on their windows and apples
instead.
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
On 5/13/26 2:01 AM, J.O. Aho wrote:
Even if u3 is the user trying to access it?
On 13/05/2026 03.04, bad sector wrote:
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
This is a blocker, only u3 is allowed, chmod so others can access
it.
May 13 20:33:20 localhost.localdomain systemd[1]: Starting The Apache Webserver...
May 13 20:33:20 localhost.localdomain start_apache2[3268]: httpd-
prefork: Syntax error in -C/-c directive: Syntax error on line 2 of / etc/apache2/sysconfig.d/include.conf: Could not open configuration
file /var/myapache/myapache.conf: Permission denied
On 5/13/26 7:08 PM, Richard Kettlewell wrote:
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
I tried /var/myapache/myapache.conf no change :-(
# apconf_path=/var/myapache/myapache.conf; while [ "$apconf_path" !=
"/" ]; do ls -ld "$apconf_path"; apconf_path=$(dirname
"$apconf_path"); done;
-rwxrwxrwx. 1 root users 2479 May 13 19:24 /var/myapache/myapache.conf drwxrwxrwx. 2 root users 4096 May 13 19:24 /var/myapache
drwxr-xr-x. 12 root root 4096 May 13 20:19 /var
On 14/05/2026 02.45, bad sector wrote:
May 13 20:33:20 localhost.localdomain systemd[1]: Starting The Apache
Webserver...
May 13 20:33:20 localhost.localdomain start_apache2[3268]: httpd-
prefork: Syntax error in -C/-c directive: Syntax error on line 2 of /
etc/apache2/sysconfig.d/include.conf: Could not open configuration
file /var/myapache/myapache.conf: Permission denied
Could you run:
sudo getenforce | grep -E "(SELinux status|Current mode)"
and
sudo aa-status
I know one of them should generate command not found, but just want to
be on the safe side.
Reading the apache documentation https://httpd.apache.org/docs/2.4/mod/core.html#include
even if it allows the full path, it may require that the file is located
in the apache configuration directory structure.
Traditionally you would use AllowOverride in the configuration to allow users to use .htaccess files, and maybe that is the way for you to go https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride
bad sector <forgetski@_INVALID.net> writes:
On 5/13/26 7:08 PM, Richard Kettlewell wrote:
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
I tried /var/myapache/myapache.conf no change :-(
That is not a sensible place. /etc is for configuration, /var is for
variable state.
You need to sort out the file permissions too. Some applications will
refuse to open files with insecure permisssions. I donrCOt know if Apache
is one of them (and I donrCOt care, because I donrCOt make all my files
world writable).
If you want to get somewhere, stop trying to swim against the tide.
On Wed, 13 May 2026 17:54:24 -0400, bad sector wrote:
On 5/13/26 2:01 AM, J.O. Aho wrote:
Even if u3 is the user trying to access it?
On 13/05/2026 03.04, bad sector wrote:
the real path is a little longer and I used two versions of it
drwx------. 26 u3 users 4096 May 12 18:56 /home/u3
This is a blocker, only u3 is allowed, chmod so others can access
it.
Apache normally runs web-facing code under the rCLwww-datarCY user.
bad sector <forgetski@_INVALID.net> writes:
On 5/13/26 7:08 PM, Richard Kettlewell wrote:
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
I tried /var/myapache/myapache.conf no change :-(
That is not a sensible place. /etc is for configuration, /var is for
variable state.
You need to sort out the file permissions too. Some applications will
refuse to open files with insecure permisssions. I donrCOt know if Apache
is one of them (and I donrCOt care, because I donrCOt make all my files
world writable).
If you want to get somewhere, stop trying to swim against the tide.
bad sector <forgetski@_INVALID.net> writes:
On 5/13/26 7:08 PM, Richard Kettlewell wrote:
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
I tried /var/myapache/myapache.conf no change :-(
That is not a sensible place. /etc is for configuration, /var is for
variable state.
You need to sort out the file permissions too. Some applications will
refuse to open files with insecure permisssions. I donrCOt know if Apache
is one of them (and I donrCOt care, because I donrCOt make all my files
world writable).
If you want to get somewhere, stop trying to swim against the tide.
bad sector <forgetski@_INVALID.net> writes:
On 5/13/26 7:08 PM, Richard Kettlewell wrote:
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
I tried /var/myapache/myapache.conf no change :-(
That is not a sensible place. /etc is for configuration, /var is for
variable state.
# apconf_path=/var/myapache/myapache.conf; while [ "$apconf_path" !=
"/" ]; do ls -ld "$apconf_path"; apconf_path=$(dirname
"$apconf_path"); done;
-rwxrwxrwx. 1 root users 2479 May 13 19:24 /var/myapache/myapache.conf
drwxrwxrwx. 2 root users 4096 May 13 19:24 /var/myapache
drwxr-xr-x. 12 root root 4096 May 13 20:19 /var
You need to sort out the file permissions too. Some applications will
refuse to open files with insecure permisssions. I donrCOt know if Apache
is one of them (and I donrCOt care, because I donrCOt make all my files
world writable).
If you want to get somewhere, stop trying to swim against the tide.
bad sector <forgetski@_INVALID.net> writes:
On 5/13/26 7:08 PM, Richard Kettlewell wrote:
u3 can access it, no other user can. Apache wonrCOt be running as u3,
unless yourCOve specifically arranged that it does.
Just put your config file in a more sensible place.
I tried /var/myapache/myapache.conf no change :-(
That is not a sensible place. /etc is for configuration, /var is for variable state.
You need to sort out the file permissions too. Some applications will
refuse to open files with insecure permisssions. I donrCOt know if Apache
is one of them (and I donrCOt care, because I donrCOt make all my files world writable).
If you want to get somewhere, stop trying to swim against the tide.
/var/log/apache2/error.log says:
[Thu May 14 20:35:53.863279 2026] [core:error] [pid 4579:tid 4579] (13)Permission denied: [client 127.0.0.1:48674] AH00035: access to / temp-pub-buffer/coques-clams.jpg denied (filesystem path '/0/homes/ u3/0Link/htdocs/user/temp-pub-buffer/coques-clams.jpg') because search permissions are missing on a component of the path
"because search permissions are missing on a component of the path"???
I wan't NO auto indexing so trhis is the defalut-server.conf
IndexIgnore * */* .??* *~ *
..or any other form of indexing so there is an index.html file in all directories but most of them just remind the visitor to request a
specific URL.
On 15/05/2026 03.16, bad sector wrote:
/var/log/apache2/error.log says:
[Thu May 14 20:35:53.863279 2026] [core:error] [pid 4579:tid 4579]
(13)Permission denied: [client 127.0.0.1:48674] AH00035: access to /
temp-pub-buffer/coques-clams.jpg denied (filesystem path '/0/homes/
u3/0Link/htdocs/user/temp-pub-buffer/coques-clams.jpg') because search
permissions are missing on a component of the path
you could try something like:
chcon -R --type=httpd_sys_rw_content_t /0/homes/ u3/0Link/htdocs
found this stack overflow for it: https://stackoverflow.com/questions/25190043/apache-permissions-are- missing-on-a-component-of-the-path
It's been like 8 years since I last played with apache.
On 5/15/26 1:56 AM, J.O. Aho wrote:
you could try something like:
chcon -R --type=httpd_sys_rw_content_t /0/homes/ u3/0Link/htdocs
found this stack overflow for it:
https://stackoverflow.com/questions/25190043/apache-permissions-are-
missing-on-a-component-of-the-path
Thanks, I'll try that tonight on my desktop, sounds like a maybe (should really just uninstall selinux if I could).
...
It's been like 8 years since I last played with apache.
The only thing I used to use it for was developing and testing my pages
and scripts before uploading to my dns provider. All I want is 127.0.0.1
but that much with absolutely no constraints for scripts, includes or anything that can work on a web page. Nowadays all I do is the odd edit,
no more dev. or scripting which were never more than amateur efforts
anyway.
Problem is, when I get things to work it usually falls apart after a few months when some update fixes what wasn't broken (in terms of my needs).
In the old days it all went into /etc/httpd on all systems but now its scattered all over the place so if I want to avoid tons of duplication
when booting different distros I have to park my rags in a common path accessible from any system.
Problem is, when I get things to work it usually falls apart after a few months when some update fixes what wasn't broken (in terms of my needs).
In the old days it all went into /etc/httpd on all systems but now its scattered all over the place so if I want to avoid tons of duplication--
when booting different distros I have to park my rags in a common path accessible from any system.
On 15/05/2026 12.56, bad sector wrote:
On 5/15/26 1:56 AM, J.O. Aho wrote:
you could try something like:
chcon -R --type=httpd_sys_rw_content_t /0/homes/ u3/0Link/htdocs
found this stack overflow for it:
https://stackoverflow.com/questions/25190043/apache-permissions-are-
missing-on-a-component-of-the-path
Thanks, I'll try that tonight on my desktop, sounds like a maybe
(should really just uninstall selinux if I could).
You can always switch to permissive mode, kind of a middle ground where
the rules are checked but no active "blocking" done.
# systemctl start apache2.service
Job for apache2.service failed because the control
process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu
apache2.service" for details.
# systemctl status apache2.service
httpd-prefork: Syntax error in -C/-c directive: Syntax error on line 2
of /etc/apache2/sysconfig.d/include.conf: Could not open configuration
file /path/myapache/myapache.conf: Permission denied
/etc/apache2/sysconfig.d/include.conf
# File generated from /etc/sysconfig/apache2, do not edit. Edit the sysconfig file instead.
Include /path/myapache/myapache.conf
It seems to find a synatx error in my fully qualified path to my config
file which has wide open permissions (using as local server only).
What am I missing?
DocumentRoot "/0/homes/u3/0Link/htdocs/user"
On Sun, 5/17/2026 12:57 AM, bad sector wrote:
DocumentRoot "/0/homes/u3/0Link/htdocs/user"
Now, imagine if the apache software had a "default" DocumentRoot.
If you had not defined a DocumentRoot anywhere, it might have
been attempting to use something else (which may or may not exist).
$ sudo nano /etc/apache2/apache2.conf
<Directory /var/www/> <=== presumed DocumentRoot ?
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Paul
All "I" ever needed or wanted was an unconstrained LOCAL server for
testing without any desire to ever become a web-server specialist.
On Sun, 17 May 2026 18:19:32 -0400, bad sector wrote:
All "I" ever needed or wanted was an unconstrained LOCAL server for
testing without any desire to ever become a web-server specialist.
You donrCOt even need to run Apache to do that. For example, I can write
a simple test Python program using this <https://docs.python.org/3/library/http.server.html> standard library
module, start it listening on a local port, point my browser at that
port, and IrCOm away.
On 5/17/26 6:34 PM, Lawrence DrCOOliveiro wrote:
On Sun, 17 May 2026 18:19:32 -0400, bad sector wrote:
All "I" ever needed or wanted was an unconstrained LOCAL server
for testing without any desire to ever become a web-server
specialist.
You donrCOt even need to run Apache to do that. For example, I can
write a simple test Python program using this
<https://docs.python.org/3/library/http.server.html> standard
library module, start it listening on a local port, point my
browser at that port, and IrCOm away.
That's over my head and I know less than nothing about py. My
provider uses apache and so if my pages and perl scripts run on my
local apache then chances are that they will also run on his apache
web server.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 01:41:41 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,188 |