• Any Apache Experts?

    From Farley Flud@3:633/10 to All on Thursday, March 05, 2026 13:57:03
    My personal website, hosted on a Linux server using Apache,
    contains some files with a "cs" extension:

    file.cs

    When visitors attempt to access those files they receive
    a 403 error:

    ERROR 403: Forbidden.


    The solution should be to add a "cs" MIME type to the
    Apache .htaccess file in the root directory:

    AddType application/octet-stream cs

    But when I do this the 403 error still occurs.

    As temporary workaround I have added the "txt" extension
    to each "cs" file:

    file.cs.txt

    This allows regular access but I would rather not do this
    as these files are not actually human-readable.

    Is there a way to instruct Apache to permit access to these
    files?




    --
    Gentoo/LFS: Is there any-fucking-thing else?

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Thursday, March 05, 2026 14:56:36
    "ERROR 403: Forbidden." more correctly means that the files are not "readable" by the httpd process. Depending on the distro, this could be because the files (or the directory they are in) are not owned by www-data (or whatever user the httpd runs as) or you have selinux installed and enabled and the files are not in an directory enabled for web access (eg with the proper selinux ACL). Or
    the files lack read access -- the file don't actually need to be owned by the user the httpd process runs under, so long as they and their parent
    directories have read access (the directories just need execute access to
    allow traversal). If the files/directories have a different group or owner, they need the proper group or world read/execute access. The MIME type only matters if that is needed for proper interpretation by the browser is an
    issue, but lacking a proper MIME type won't cause a 403 error. There *could*
    be issues if the files are symlinks and the FollowSymLinks Option is missing from <Directory> elements.

    At Thu, 05 Mar 2026 13:57:03 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    My personal website, hosted on a Linux server using Apache,
    contains some files with a "cs" extension:

    file.cs

    When visitors attempt to access those files they receive
    a 403 error:

    ERROR 403: Forbidden.


    The solution should be to add a "cs" MIME type to the
    Apache .htaccess file in the root directory:

    AddType application/octet-stream cs

    But when I do this the 403 error still occurs.

    As temporary workaround I have added the "txt" extension
    to each "cs" file:

    file.cs.txt

    This allows regular access but I would rather not do this
    as these files are not actually human-readable.

    Is there a way to instruct Apache to permit access to these
    files?





    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Thursday, March 05, 2026 15:00:59
    On 05/03/2026 14:56, Robert Heller wrote:
    "ERROR 403: Forbidden." more correctly means that the files are not "readable"
    by the httpd process. Depending on the distro, this could be because the files
    (or the directory they are in) are not owned by www-data (or whatever user the
    httpd runs as) or you have selinux installed and enabled and the files are not
    in an directory enabled for web access (eg with the proper selinux ACL). Or the files lack read access -- the file don't actually need to be owned by the user the httpd process runs under, so long as they and their parent directories have read access (the directories just need execute access to allow traversal). If the files/directories have a different group or owner, they need the proper group or world read/execute access. The MIME type only matters if that is needed for proper interpretation by the browser is an issue, but lacking a proper MIME type won't cause a 403 error. There *could* be issues if the files are symlinks and the FollowSymLinks Option is missing from <Directory> elements.

    Yes. It's a permissions, not a 'I can't understand the type' error.
    Check to see who owns the files and what the perms are.

    I think I fixed something like this by making the directory have the
    sticky bit set and the group www

    At Thu, 05 Mar 2026 13:57:03 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    My personal website, hosted on a Linux server using Apache,
    contains some files with a "cs" extension:

    file.cs

    When visitors attempt to access those files they receive
    a 403 error:

    ERROR 403: Forbidden.


    The solution should be to add a "cs" MIME type to the
    Apache .htaccess file in the root directory:

    AddType application/octet-stream cs

    But when I do this the 403 error still occurs.

    As temporary workaround I have added the "txt" extension
    to each "cs" file:

    file.cs.txt

    This allows regular access but I would rather not do this
    as these files are not actually human-readable.

    Is there a way to instruct Apache to permit access to these
    files?






    --
    There?s a mighty big difference between good, sound reasons and reasons
    that sound good.

    Burton Hillis (William Vaughn, American columnist)


    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Thursday, March 05, 2026 15:44:54
    On Thu, 5 Mar 2026 15:00:59 +0000, The Natural Philosopher wrote:

    On 05/03/2026 14:56, Robert Heller wrote:
    "ERROR 403: Forbidden." more correctly means that the files are not "readable"
    by the httpd process. Depending on the distro, this could be because the files
    (or the directory they are in) are not owned by www-data (or whatever user the
    httpd runs as) or you have selinux installed and enabled and the files are not
    in an directory enabled for web access (eg with the proper selinux ACL). Or >> the files lack read access -- the file don't actually need to be owned by the
    user the httpd process runs under, so long as they and their parent
    directories have read access (the directories just need execute access to
    allow traversal). If the files/directories have a different group or owner, >> they need the proper group or world read/execute access. The MIME type only >> matters if that is needed for proper interpretation by the browser is an
    issue, but lacking a proper MIME type won't cause a 403 error. There *could* >> be issues if the files are symlinks and the FollowSymLinks Option is missing >> from <Directory> elements.

    Yes. It's a permissions, not a 'I can't understand the type' error.
    Check to see who owns the files and what the perms are.


    It can't be a permissions problem because I can just rename the files
    to add the "txt" extension without altering any permissions and then
    the files are accessible.

    What also puzzles me is that after checking the server logs there is no
    403 error reported anywhere.


    My .htaccess file is located in the root directory of the website tree.
    Maybe I need to move it the directory of the web page that actually delivers those "cs" files.



    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Thursday, March 05, 2026 18:43:00
    At Thu, 05 Mar 2026 15:44:54 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    On Thu, 5 Mar 2026 15:00:59 +0000, The Natural Philosopher wrote:

    On 05/03/2026 14:56, Robert Heller wrote:
    "ERROR 403: Forbidden." more correctly means that the files are not "readable"
    by the httpd process. Depending on the distro, this could be because the files
    (or the directory they are in) are not owned by www-data (or whatever user the
    httpd runs as) or you have selinux installed and enabled and the files are not
    in an directory enabled for web access (eg with the proper selinux ACL). Or
    the files lack read access -- the file don't actually need to be owned by the
    user the httpd process runs under, so long as they and their parent
    directories have read access (the directories just need execute access to >> allow traversal). If the files/directories have a different group or owner,
    they need the proper group or world read/execute access. The MIME type only
    matters if that is needed for proper interpretation by the browser is an >> issue, but lacking a proper MIME type won't cause a 403 error. There *could*
    be issues if the files are symlinks and the FollowSymLinks Option is missing
    from <Directory> elements.

    Yes. It's a permissions, not a 'I can't understand the type' error.
    Check to see who owns the files and what the perms are.


    It can't be a permissions problem because I can just rename the files
    to add the "txt" extension without altering any permissions and then
    the files are accessible.

    That makes no sense. 403 is specificly a permissions issue, never a MIME type. Maybe something else is going on. Are you defining a *handler* for .cs files? If so it might be a problem with the *handler* and not the files themselves.


    What also puzzles me is that after checking the server logs there is no
    403 error reported anywhere.


    Hmm... It might not really be a 403 error at all and something else is going on. What *exactly* are these .cs files?


    My .htaccess file is located in the root directory of the website tree.
    Maybe I need to move it the directory of the web page that actually delivers those "cs" files.

    That should not matter.






    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Thursday, March 05, 2026 20:10:59
    On Thu, 5 Mar 2026 18:43:00 -0000 (UTC), Robert Heller wrote:


    It can't be a permissions problem because I can just rename the files
    to add the "txt" extension without altering any permissions and then
    the files are accessible.

    That makes no sense. 403 is specificly a permissions issue, never a MIME type. Maybe something else is going on. Are you defining a *handler* for .cs
    files? If so it might be a problem with the *handler* and not the files themselves.


    I first reported this problem to the Help staff at my web hosting service.
    They responded by telling me to use cPanel to add the MIME type for the "cs" extension. cPanel just appends the line "AddType application/octet-stream cs" to the .htaccess file. However, that solution did not work.

    The permissions on the relevant directories are 755 as they should be.
    The permissions on the files are 644 as they should be.


    Hmm... It might not really be a 403 error at all and something else is going on. What *exactly* are these .cs files?


    The complete error message that is shown in a browser is this:

    Forbidden

    You don't have permission to access this resource.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


    The .cs files are Tcl scripts that are modified to be used with
    a certain program. They are basically text files that contain Tcl commands.

    As I mentioned, I can rename the files to add the "txt" extension
    and the problem disappears.

    But I am getting nowhere with this issue. I'll just leave the workaround
    of renaming to txt in place.


    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Thursday, March 05, 2026 20:59:21
    On Thu, 5 Mar 2026 14:56:36 -0000 (UTC), Robert Heller wrote:

    "ERROR 403: Forbidden." more correctly means that the files are not "readable" by the httpd process.

    No. It means the web client is not allowed access. Whether it?s due to server-side filesystem permissions, or just that the web server is
    configured not to allow access to that user, is not a distinction
    visible to that user. Nor should it be.

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Thursday, March 05, 2026 21:04:53
    At Thu, 05 Mar 2026 20:10:59 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    On Thu, 5 Mar 2026 18:43:00 -0000 (UTC), Robert Heller wrote:


    It can't be a permissions problem because I can just rename the files
    to add the "txt" extension without altering any permissions and then
    the files are accessible.

    That makes no sense. 403 is specificly a permissions issue, never a MIME type. Maybe something else is going on. Are you defining a *handler* for .cs
    files? If so it might be a problem with the *handler* and not the files themselves.


    I first reported this problem to the Help staff at my web hosting service. They responded by telling me to use cPanel to add the MIME type for the "cs" extension. cPanel just appends the line "AddType application/octet-stream cs"
    to the .htaccess file. However, that solution did not work.

    The Help staff of your web hosting service are idiots. The 403 error has nothing to do with MIME types. It is specificly about permissions.


    The permissions on the relevant directories are 755 as they should be.
    The permissions on the files are 644 as they should be.

    What about owner and group?



    Hmm... It might not really be a 403 error at all and something else is going
    on. What *exactly* are these .cs files?


    The complete error message that is shown in a browser is this:

    Forbidden

    You don't have permission to access this resource.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    This suggests that the owner, group, and persmissions of the Error Document are wrong...



    The .cs files are Tcl scripts that are modified to be used with
    a certain program. They are basically text files that contain Tcl commands.


    Then you should be adding a line like:

    AddType text/tcl cs

    to .htaccess

    But that should matter reguarding the 403 error.

    What is the owner, group, and permissions of .htaccess?

    As I mentioned, I can rename the files to add the "txt" extension
    and the problem disappears.

    But I am getting nowhere with this issue. I'll just leave the workaround
    of renaming to txt in place.




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Thursday, March 05, 2026 21:57:15
    On Thu, 5 Mar 2026 21:04:53 -0000 (UTC), Robert Heller wrote:


    The Help staff of your web hosting service are idiots.


    I could get better help if I were to pay for the premium service
    but this problem is not critical.



    The permissions on the relevant directories are 755 as they should be.
    The permissions on the files are 644 as they should be.

    What about owner and group?


    The owner and group of every file on the website, and not just the .cs files, are "root."

    FWIW, you can use the following wget commands to access the .cs files and
    the .cs.txt files. Both files are in the same directory with the same permissions:

    wget http://lapiet.info/mathphys/diffgeo/diffgeo1/geomview/monkey_Saddle-parabola-curve.cs

    wget http://lapiet.info/mathphys/diffgeo/diffgeo1/geomview/monkey_Saddle-parabola-curve.cs.txt

    The first command will report 403 and the second will download the file
    with no problem.

    The files are identical except for the file name extensions.



    Then you should be adding a line like:

    AddType text/tcl cs

    to .htaccess


    I've tried:

    AddType application/x-tcl cs

    AddType text/x-script.tcl cs

    Neither work.


    I suspect that the Apache server at the web host is not configured
    properly,


    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Thursday, March 05, 2026 22:10:00
    On Thu, 5 Mar 2026 21:09:09 +0000, Andy Burns wrote:

    Could it be SElinux stopping mod_tcl from accessing the files ...

    Running server-side scripts in a web-server-based module is not a very
    flexible way of doing it. Leave that to the PHP noddies. Run your
    program in its own process, with its own mini web server interface,
    with requests (and responses) proxied via the main web server.

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Thursday, March 05, 2026 22:19:25
    On Thu, 5 Mar 2026 21:09:09 +0000, Andy Burns wrote:


    Do you want to interpret the tcl files, or merely display them?


    They are text files. The web browser should display them with the
    option of downloading.

    I have several C program files that are also linked within my web
    pages. These files are displayed when the visitor clicks on the
    links, but the user can also choose to download.



    Could it be SElinux stopping mod_tcl from accessing the files, maybe you need to run

    chcon -R -t httpd_sys_content_t /your/web/content/folder

    to allow it?


    This is a web hosting service. I only have access to my website
    files, server logs, and a very limited other set of files.

    I could not make that kind of change.

    I thought that this issue would have an easy solution but it
    seems that it may require a lot of debugging and I don't know
    if it would be worth it.





    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Richard Kettlewell@3:633/10 to All on Thursday, March 05, 2026 22:47:27
    Lawrence D?Oliveiro <ldo@nz.invalid> writes:
    On Thu, 5 Mar 2026 14:56:36 -0000 (UTC), Robert Heller wrote:
    "ERROR 403: Forbidden." more correctly means that the files are not
    "readable" by the httpd process.

    No. It means the web client is not allowed access. Whether it?s due to server-side filesystem permissions, or just that the web server is
    configured not to allow access to that user, is not a distinction
    visible to that user. Nor should it be.

    It ought to be visible in server logs. In the case of a standard
    permissions issue, for example, you would see the 403 reported in the
    access log and a ?file permissions deny server access? message in the
    error log.

    If it?s appearing in the access log but not the error log then you?ve
    found a case that isn?t properly logged. I don?t know what the Apache
    project?s view on that would be but it seems like it should be
    considered a bug.

    If it?s not even appearing in the access log then the request is not
    reaching the server, and no amount of tinkering with server
    configuration will make any difference.

    To debug it properly would require visibility of the server
    configuration, any relevant .htaccess files, and any proxies/WAFs/etc
    that may be in the mix.

    --
    https://www.greenend.org.uk/rjk/

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Friday, March 06, 2026 01:47:03
    At Thu, 05 Mar 2026 21:57:15 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    On Thu, 5 Mar 2026 21:04:53 -0000 (UTC), Robert Heller wrote:


    The Help staff of your web hosting service are idiots.


    I could get better help if I were to pay for the premium service
    but this problem is not critical.



    The permissions on the relevant directories are 755 as they should be.
    The permissions on the files are 644 as they should be.

    What about owner and group?


    The owner and group of every file on the website, and not just the .cs files, are "root."

    FWIW, you can use the following wget commands to access the .cs files and
    the .cs.txt files. Both files are in the same directory with the same permissions:

    wget http://lapiet.info/mathphys/diffgeo/diffgeo1/geomview/monkey_Saddle-parabola-curve.cs

    wget http://lapiet.info/mathphys/diffgeo/diffgeo1/geomview/monkey_Saddle-parabola-curve.cs.txt

    The first command will report 403 and the second will download the file
    with no problem.

    The files are identical except for the file name extensions.

    OK, there is something "weird" going on. Do you have the site config files? (The file with <VirtualHost *:443>
    ServerName lapiet.info
    ..
    </VirtualHost>

    Partitularly, the <Directory ...> ... </Directory> lines. There is some fishy with the various options and settings there,




    Then you should be adding a line like:

    AddType text/tcl cs

    to .htaccess


    I've tried:

    AddType application/x-tcl cs

    AddType text/x-script.tcl cs

    AddType text/x-tcl cs
    *OR*
    AddType text/plain cs


    Neither work.


    I suspect that the Apache server at the web host is not configured
    properly,


    Likely. Do you have access to the site config file?




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Friday, March 06, 2026 02:07:06
    I've poking through my various Apache2 config files and found something interesting:

    In /etc/apache2/mods-enabled/mime.conf there is this line:

    AddLanguage cs .cz .cs

    This suggests that files ending in .cs might be considered to be in Czech. This might be causing problems. Like maybe the Czech language module is not installed or inaccessable or something like that and the 403 error relates to that.

    Try adding

    RemoveLanguage cs

    to ,htaccess

    Is there some reason these files are using the .cs extension and not .tcl?

    At Thu, 05 Mar 2026 22:19:25 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    On Thu, 5 Mar 2026 21:09:09 +0000, Andy Burns wrote:


    Do you want to interpret the tcl files, or merely display them?


    They are text files. The web browser should display them with the
    option of downloading.

    I have several C program files that are also linked within my web
    pages. These files are displayed when the visitor clicks on the
    links, but the user can also choose to download.



    Could it be SElinux stopping mod_tcl from accessing the files, maybe you need to run

    chcon -R -t httpd_sys_content_t /your/web/content/folder

    to allow it?


    This is a web hosting service. I only have access to my website
    files, server logs, and a very limited other set of files.

    I could not make that kind of change.

    I thought that this issue would have an easy solution but it
    seems that it may require a lot of debugging and I don't know
    if it would be worth it.







    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Friday, March 06, 2026 11:16:21
    On 05/03/2026 21:57, Farley Flud wrote:
    wgethttp://lapiet.info/mathphys/diffgeo/diffgeo1/geomview/monkey_Saddle-parabola-curve.cs

    wgethttp://lapiet.info/mathphys/diffgeo/diffgeo1/geomview/monkey_Saddle-parabola-curve.cs.txt

    The first command will report 403 and the second will download the file
    with no problem.

    Given its you, I simply do not believe you

    --
    A lie can travel halfway around the world while the truth is putting on
    its shoes.


    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Friday, March 06, 2026 16:21:57
    On Fri, 6 Mar 2026 01:47:03 -0000 (UTC), Robert Heller wrote:


    OK, there is something "weird" going on.


    That is likely. But I think that it is worth pursuing
    beyond the advice that I have received so far.

    This particular "cs" extension is the only one that gives
    me problems. I have, for example, files with a "wxmx"
    extension that has no official MIME type, yet visitors
    can download the wxmx files without problem.


    Do you have the site config files?
    (The file with <VirtualHost *:443>
    ServerName lapiet.info
    ..
    </VirtualHost>

    Partitularly, the <Directory ...> ... </Directory> lines. There is some fishy
    with the various options and settings there,


    No, I do not.

    The website is actually on "shared hosting." I do not have an
    independent IP address.

    The host is: www.aspnix.com



    AddType text/x-tcl cs
    *OR*
    AddType text/plain cs


    I've tried both. Still no joy.

    I'll just have to keep the workaround of renaming the files
    with a "txt" extension appended.

    Everything else is fine and has been for several years.

    But I put up a new page with these "cs" files and a recent
    visitor informed me of the problem with access.


    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Friday, March 06, 2026 16:30:45
    On Fri, 6 Mar 2026 14:11:07 -0000 (UTC), fregas wrote:


    Typically .cs files are csharp files O i assume you're doing some kind
    of programming or wanting to show programming files, but not sure.

    What is it you're actually trying to accomplish? Simply display source
    code in your website?


    These cs files are for the visitor to download to his machine and then
    load into his local software so as to duplicate the results that are
    shown on the website.

    But I have given up trying to solve this.

    Thanks to all for the advice.


    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Farley Flud@3:633/10 to All on Friday, March 06, 2026 16:33:59
    On Fri, 6 Mar 2026 11:16:21 +0000, The Natural Philosopher wrote:


    Given its you, I simply do not believe you


    Do not place blame on others for your obviously sheltered
    and limited upbringing.




    --
    Gentoo/LFS: Is there any-fucking-thing else?

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Stéphane CARPENTIER@3:633/10 to All on Friday, March 06, 2026 21:23:30
    Le 06-03-2026, Farley Flud <ff@gnulinux.rocks> a ‚critÿ:

    But I have given up trying to solve this.

    What a surprise. Maybe your website has been pawned by a script kiddie.
    Who knows?

    Thanks to all for the advice.

    And in the next message you insult all people who tried to help you.
    It's the exact reason why I won't help you again.

    --
    Si vous avez du temps … perdre :
    https://scarpet42.gitlab.io

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From vallor@3:633/10 to All on Friday, March 06, 2026 22:34:53
    At Fri, 06 Mar 2026 16:30:45 +0000, Farley Flud <ff@gnulinux.rocks> wrote:

    On Fri, 6 Mar 2026 14:11:07 -0000 (UTC), fregas wrote:


    Typically .cs files are csharp files O i assume you're doing some kind
    of programming or wanting to show programming files, but not sure.

    What is it you're actually trying to accomplish? Simply display source code in your website?


    These cs files are for the visitor to download to his machine and then
    load into his local software so as to duplicate the results that are
    shown on the website.

    But I have given up trying to solve this.

    Thanks to all for the advice.

    I admire your patience -- you waited a whole 9 minutes for the
    answer...

    Anyway, it's part of the default Apache 2 configuration to treate
    .cs files as a different language.

    https://httpd.apache.org/docs/2.4/mod/mod_mime.html#addlanguage

    # egrep "\.cs$" etc/apache2/*/*.conf etc/apache2/mods-available/mime.conf:AddLanguage cs .cz .cs etc/apache2/mods-enabled/mime.conf:AddLanguage cs .cz .cs

    ...and there was nothing keeping you from looking up the docs
    for this.

    Anyway, tell your provider to remove that line from mods-available, and
    it will work right.

    Or better yet, get a vps on Digital Ocean, and assume control
    of the whole server. A tiny server is $6/mo.

    --
    -v System76 Thelio Mega v1.1 x86_64 Mem: 258G
    OS: Linux 7.0.0-rc2 D: Mint 22.3 DE: Xfce 4.18 (X11)
    NVIDIA GeForce RTX 3090Ti (24G) (580.126.18)
    "Useless Invention: Camcorder with braile-encoded buttons."

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From vallor@3:633/10 to All on Saturday, March 07, 2026 01:51:12
    At Fri, 6 Mar 2026 02:07:06 -0000 (UTC), Robert Heller <heller@deepsoft.com> wrote:

    I've poking through my various Apache2 config files and found something interesting:

    In /etc/apache2/mods-enabled/mime.conf there is this line:

    AddLanguage cs .cz .cs


    I think you are absolutely correct -- and I posted before I saw your
    post.

    I think the kids call it being "ninjaed"... ;)

    -Scott

    This suggests that files ending in .cs might be considered to be in Czech. This might be causing problems. Like maybe the Czech language module is not installed or inaccessable or something like that and the 403 error relates to that.

    Try adding

    RemoveLanguage cs

    to ,htaccess

    Is there some reason these files are using the .cs extension and not .tcl?

    At Thu, 05 Mar 2026 22:19:25 +0000 Farley Flud <ff@gnulinux.rocks> wrote:


    On Thu, 5 Mar 2026 21:09:09 +0000, Andy Burns wrote:


    Do you want to interpret the tcl files, or merely display them?


    They are text files. The web browser should display them with the
    option of downloading.

    I have several C program files that are also linked within my web
    pages. These files are displayed when the visitor clicks on the
    links, but the user can also choose to download.



    Could it be SElinux stopping mod_tcl from accessing the files, maybe you need to run

    chcon -R -t httpd_sys_content_t /your/web/content/folder

    to allow it?


    This is a web hosting service. I only have access to my website
    files, server logs, and a very limited other set of files.

    I could not make that kind of change.

    I thought that this issue would have an easy solution but it
    seems that it may require a lot of debugging and I don't know
    if it would be worth it.







    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services http://www.deepsoft.com/ -- Linux Administration Services heller@deepsoft.com -- Webhosting Services



    --
    -Scott System76 Thelio Mega v1.1 x86_64 Mem: 258G
    OS: Linux 7.0.0-rc2 D: Mint 22.3 DE: Xfce 4.18 (X11)
    NVIDIA GeForce RTX 3090Ti (24G) (580.126.18)
    "Sarcasm: barbed ire."

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)