News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Issue with Package Manager, File Permissions Field: "Local path to SMF"

Started by CalebCarroll, August 03, 2021, 06:29:02 PM

Previous topic - Next topic

CalebCarroll

Hello all.  Just to be clear this is not a request for help - this is just to outline a fix for a problem with the "package_ftp" structure:


Sources/Packages.php Line 1575:  $detect_path provides incorrect or incomplete path...
'path' => : $detect_path,

Replacement line to provide correct value obtained from {db_prefix}_settings database table:
'path' => isset($modSettings['package_path']) ? $modSettings['package_path'] : $detect_path,

For reference here is the database table - in my case {db_prefix} = "smf"

mysql> select * from smf_settings where variable rlike "package";
+----------------------+---------------+
| variable             | value         |
+----------------------+---------------+
| package_make_backups |               |
| package_path         | /var/www/html |
| package_server       | localhost     |
| package_port         | 21            |
| package_username     | www-data      |
+----------------------+---------------+
5 rows in set (0.00 sec)

Kindred

the path to packages is defined by the variable that defines the board directory and then packages is a subdirectory.

if you have anything else, then you have modified the core routines
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aleksi "Lex" Kilpinen

I'm not 100% sure I follow the issue outlined, but the actual FTP accessible directory structure will vary based on your FTP user - There is no real actual way for SMF to know what it is,
so I think the detect_path is simply attempting to provide you with a hint, and anything you fix for yourself might not work for others.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

CalebCarroll

First of all, I certainly haven't modified core routines.  I did however update from an older version.  Yes, I think $detect_path is related to the FTP user path but it can be set and that setting seems to have been stored in the database (perhaps by a previous version of SMF - I sure didn't place it there).

Steve

As this is not really a support request, I'm moving this to the Tips and Tricks board which hopefully is the best place for it.
DO NOT pm me for support!

Advertisement: