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
Often Apache mod_security being overzealous, check its rules or disable to see if that is the culprit.
Offline
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
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/?
Offline
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
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
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
The directories need to be rwx for the user the web server runs as. However that is configured at your end.
Offline
It is owned by apache.apache and 777ed.
Offline
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?
Offline
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