Package Manager now requiring FTP info to make changes to "/home"

Started by ElusiveEagle, September 18, 2011, 08:05:11 PM

Previous topic - Next topic

ElusiveEagle

Hello!

I'm having a peculiar issue with the package manager. I can upload packages to the server just fine. When I attempt to install a package that transfers an image file to an SMF directory, the package manager says it requires my FTP information. When I click on the link to see the "affected files", here's what it states:

The following files need to made writable to continue installation:
  • /home
    In other words, it's telling me that it intends to make changes to my "/home" directory. Clearly I'm not about to do that as it could very well break my entire server and all of my other sites. When I check the permissions for "/home", they are set to 755, so that can't be the issue. Furthermore, SMF reports that everything is writable in all of its directories. I will point out that we recently moved from Apache to nginx, but when I check the permissions of "/home" on the Apache server, they are the same (755). For me, I have never had to enter my FTP details to install a mod. While on Apache, the package manager worked just fine without requiring FTP details.

    So my issue is that FTP details are now required to install any mod containing images so that SMF can make changes to my "/home" directory.

    Through some experimentation I have discovered that for each required image or each directory that contains images, the package manager tells me that "/home" needs to be writable. For example, if a mod required a directory that contained images (such as an 'images' dir), then I would see one instance of "/home" under the FTP affected files (as the above example shows). If a mod required four image files, then I would see four instances of "/home" under the FTP affected files like so:
  • /home
  • /home
  • /home
  • /home
    If I go into the files for a mod and edit the package-info.xml file to remove all instances (files or directories) that require an image file, then I do not need to enter any FTP details and the installation continues just fine.

    I just want tings to work like they should, and I'm nervous to go through with the package installation because I'm afraid it will rewrite my "/home" directory. Can someone please help? Any and all ideas are appreciated.

    Thanks for your help!

    Sincerely,

    EE

    SMF 2.0
    PHP 5.3.6
    MySQL 5.1.39-log
    Nginx 0.8.53

MrPhil

I'm not familiar with Nginx, but assuming it uses a file structure similar to Apache, where would the site root (/) be? On Apache this would be something along the lines of /home/username/public_html/... does Nginx define it as /home? There are two entries in Settings.php... do they both point to the correct site root? My guess would be that either Nginx is misconfigured, or Settings.php is. Can you confirm that both are OK? SMF should merely add something onto the $boarddir directory to get the image directory, so I can't imagine what it would want with /home, unless Settings.php is bad.

ElusiveEagle

Quote from: MrPhil on September 18, 2011, 10:57:14 PM
I'm not familiar with Nginx, but assuming it uses a file structure similar to Apache, where would the site root (/) be? On Apache this would be something along the lines of /home/username/public_html/... does Nginx define it as /home? There are two entries in Settings.php... do they both point to the correct site root? My guess would be that either Nginx is misconfigured, or Settings.php is. Can you confirm that both are OK? SMF should mere add something onto the $boarddir directory to get the image directory, so I can't imagine what it would want with /home, unless Settings.php is bad.
Thanks for the reply!

I'm gonna type this as I check the settings. First off, yep, Nginx is pretty much the same as Apache. In my case, the forum is at "/home/username/example.com".

  • First, I'll check the settings with 'repair_settings.php'. Sure enough, everything is set to the appropriate defaults.
  • Next, I'll check the 'Settings.php' file. Everything but the 'cache' path is set appropriately. I went ahead and fixed the path. I find it a bit odd that the 'cache' directory isn't included in 'repair_settings.php', but oh well. I do use APC, so the 'cache' directory isn't used anyway (as far as my understanding goes). I checked the package manager with another package, and sure enough, it still didn't work. I even tried running some of the forum maintenance and then checking again, and still no dice.
  • At this point I'm not sure what could be causing this, but I have one idea. Since the 'cache' path wasn't in 'repair_settings.php', I'm thinking something else might be missing. Let's go through each admin page and double check. OH MY GOSH! I see that the secondary theme paths are not set properly after the move to Nginx. This could very well be causing the problem. I then fixed the paths and rechecked the package manager. SUCCESS!
WOW! Thank you so much for giving me the hint I needed to figure this out! You don't know how frustrating this has been. You are a life-saver! :bow: I am not worthy. :P

Moral of the story: Don't rely on 'repair_settings.php' and instead check every possible setting yourself!

MrPhil

Glad to hear that you've got it sorted. Perhaps you should report a bug against repair_settings.php, that it needs to check and fix more items. Some of these things may have been added since repair_settings was written...

ElusiveEagle

Quote from: MrPhil on September 19, 2011, 11:43:53 AM
Glad to hear that you've got it sorted. Perhaps you should report a bug against repair_settings.php, that it needs to check and fix more items. Some of these things may have been added since repair_settings was written...

Okay, good idea! :) Thanks again.

Advertisement: