FTP Login Cookie
I noticed when trying to install a package lately that I accidentally input the wrong FTP details, and got the "The Packages directory is not writable" error, there is no way to go back and input the proper details without clearing the cookies from the browser.
Is there any way to fix this so as to delete the cookie if said error is triggered, and to allow the ability to re-enter the FTP details?
What part of the details did you enter incorrectly?
I entered the local path incorrectly. The actual FTP login (username, password, port, host) were all correct.
Try going to Admin -> Main -> Package Manager -> File Permissions. Leave everything at "no change" and enter the correct path down at the bottom where it asks for FTP info and click "make changes". I don't know if that will work or not, but it's worth a shot. I don't know if that info is actually stored anywhere.
Yup, the FTP details are stored in $modSettings - just not the password.
Doesn't work without clearing the cookie first as the FTP login form is not shown if the cookie is set. The issue seems to stem from having an incorrect local path only, and the cookie is only set when using the FTP form while installing a package.
I haven't looked at the code because I've been at work, but I believe the path variable is held either as a cookie or session var. Not sure which.
This happens in 2.0 as well as 2.1.
Edit: Actually, I think it's the password that's stored as a cookie/session var, and the form will not be shown if all the FTP details are present. What harm would it be to ask for the password every time FTP is needed, similar to the way WordPress does?
The password should be stored in session with everything else in $modSettings. The password will only exist for a short period (max 1 hour normally)
I can't reproduce this issue. If I enter in invalid FTP credentials, the system takes me back and says invalid server.
@jasonclemons @jdarwood007 are you able to still reproduce this errors using the latest build?
I'll go ahead and close this. Feel free to re-open it if the issue continues to happen with the current build