Announcement

#1 2022-03-19 22:24:31

donbell
Member
2016-06-13
11

[resolved] New install on a self served box. 403 Forbidden

Hello Folks,

Ok, I've installed the software in it's own directory off of my root web server (https://arapaho.ddbellenterprises.com) and have insured that the files are owned correctly, and that the permissions are all set to 755.

But for some reason no matter what I do I get a 403 Forbidden error.

I have checked my httpd.conf file, which seems to be right, and all seems good on that end (I have set up other sites on sub-directories and they all work, https://arapaho.ddbellenterprises.com/Tigers for example).

Thoughts?

Offline

 

#2 2022-03-20 00:31:07

erAck
Only trying to help
2015-09-06
1995

Re: [resolved] New install on a self served box. 403 Forbidden

Often Apache mod_security being overzealous, check its rules or disable to see if that is the culprit.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-03-21 12:52:54

donbell
Member
2016-06-13
11

Re: [resolved] New install on a self served box. 403 Forbidden

erAck wrote:

Often Apache mod_security being overzealous, check its rules or disable to see if that is the culprit.

Ok, not that, thanks though!

Seems I get a notification of "access denied" but attributed to phpMyAdmin every time a site attempts to access the directory.

Now, as a side, which I should have probably mentioned earlier, the directory is a separate hard drive mounted as a directory under /var/www/html/ as /var/www/html/Gallery/   Could that be the problem?

If I put the files (which will fill up the main HD) on the root drive it appears to work every time...  (Leads me to think the mounting of a 2TB drive as the Gallery director is the problem?)

Offline

 

#4 2022-03-21 19:25:18

erAck
Only trying to help
2015-09-06
1995

Re: [resolved] New install on a self served box. 403 Forbidden

Check the permissions of /var/www/html/Gallery/ and its subdirectories and files. Obviously needs to be at least readable and traversable by the user the web server runs as. Size shouldn't matter (if your OS can cope with it). And how did you tell Piwigo that the gallery files are under /var/www/html/Gallery/?


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2022-03-23 19:55:59

donbell
Member
2016-06-13
11

Re: [resolved] New install on a self served box. 403 Forbidden

erAck wrote:

Check the permissions of /var/www/html/Gallery/ and its subdirectories and files. Obviously needs to be at last readable and traversable by the user the web server runs as. Size shouldn't matter (if your OS can cope with it). And how did you tell Piwigo that the gallery files are under /var/www/html/Gallery/?

Haven't been able to tell Piwigo anything yet.  I normally go to the directory after I place the software with a browser and it finds no installation active and lets me start setting it up.  All I get is "403 access".  And error logs only show a myPHPAdmin denial at the same time, which doesn't make sense to me???

I am about to unmount the drive and put the core files on the root drive, and put the photo directory on the second drive and see if that fixes the issue...

Offline

 

#6 2022-03-23 22:44:03

donbell
Member
2016-06-13
11

Re: [resolved] New install on a self served box. 403 Forbidden

Ok, I removed the mount and installed the files on the path directly on the "root drive".  Worked great.

Moved "upload" to the second drive, and all is now working...  Seems that Apache didn't like looking directly at a mounted sub-directory as a "root" directory??

Offline

 

#7 2022-03-29 23:35:08

donbell
Member
2016-06-13
11

Re: [resolved] New install on a self served box. 403 Forbidden

Ok, update...  When I reset the new hard drive to hold the photos and set it up, I set it up as uploads instead of upload, so the old directory was getting the files (main hard drive, not the 2T one...).  I realized it today and fixed it to load the new 2T drive as /var/www/html/Gallery/upload (instead of uploads).  Now I am getting a notice when I start to upload the photos that I need to set the upload directory as RWX on all levels.  It is set as so already???

Does the software not like mounted drives for the uploads?  Or is my OS (Fedora 35) not liking it with Apache (2.4.53 Fedora Linux)?

Offline

 

#8 2022-03-30 01:13:12

erAck
Only trying to help
2015-09-06
1995

Re: [resolved] New install on a self served box. 403 Forbidden

The directories need to be rwx for the user the web server runs as. However that is configured at your end.


Running Piwigo at https://erack.net/gallery/

Offline

 

#9 2022-03-30 02:09:10

donbell
Member
2016-06-13
11

Re: [resolved] New install on a self served box. 403 Forbidden

It is owned by apache.apache and 777ed.

Offline

 

#10 2022-03-30 11:48:27

erAck
Only trying to help
2015-09-06
1995

Re: [resolved] New install on a self served box. 403 Forbidden

And the subdirectories thereunder that are actually on the 2T disk, not just the mount point? Can a simple PHP script in web server context create and write an arbitrary directory and files there? And how is the device mounted?


Running Piwigo at https://erack.net/gallery/

Offline

 

#11 2022-05-17 22:49:42

donbell
Member
2016-06-13
11

Re: [resolved] New install on a self served box. 403 Forbidden

I have finally had time to fix this issue in detail yesterday!

File permissions were set right, however PHP didn't have the permissions it needed:

ausearch -c 'php-fpm' --raw | autidt2allow -M my-phpfpm
smodudule  -XX 00-i my-phpfpm.pp

All now works:

https://arapaho.ddbellenterprises.com/Gallery (Self signed cert for now, will be updating that soon, but it is secure...)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact