ElkArte Community

Elk Development => Feature Discussion => Topic started by: Spuds on September 09, 2019, 11:58:21 am

Title: FTP and the Package Manager
Post by: Spuds on September 09, 2019, 11:58:21 am
I have not used this feature in so long that I'm looking for input on if its even useful at all.

We have some FTP functionality intertwined in the package manager code, and its main use is to change permissions on files / directories.  I believe the general idea is that the web server user/group may not have permission to create/alter directories or files and using FTP with your hosting credentials will provide the needed permissions.

This code is IMO pretty ugly and I'm not really sure its useful theses days.   I feel most users would use their own FTP client or the web control panel to fix permissions etc, but perhaps not.

I think this may also be somewhat unique, I don't know if other forum software have this functionality or how they deal with the problem, if its even that big of a problem anymore?

Thanks for your input.
Title: Re: FTP and the Package Manager
Post by: badmonkey on September 09, 2019, 12:10:14 pm
I have never used this functionality. Like you said the preferred method involves client software. Is there any chance the functionality could provide a potential attack vector? If so, definitely eliminate it. Others may make good points....
Title: Re: FTP and the Package Manager
Post by: ahrasis on September 09, 2019, 09:01:05 pm
Just remove it. And that old data backup too.
Title: Re: FTP and the Package Manager
Post by: radu81 on September 10, 2019, 02:20:44 am
Never used it.
Title: Re: FTP and the Package Manager
Post by: emanuele on September 10, 2019, 07:15:05 am
heh.
This is another tricky one.
Not so long ago, I've seen several people installing the forum through Softaculous and alike, and then tried to manage the entire thing through a cellphone.
That may work, though it's tough.
In a similar config ftp support would be mandatory.

On the other hand, I've seen several people asking to support sFTP (or any of the alternatives). And this makes me think someone actually uses it.

But, darn it's a pain.

Personally I don't think I've ever used it (even only because I always fear that changing permissions would create troubles).

I think an intermediate solution could be interesting: drop the binding to the package manager and have a separated feature "fix file permissions" that would go through the file system and try to fix possible permission problems.
This should make it easier to deal with PM code and FTP code. Dunno.
Title: Re: FTP and the Package Manager
Post by: Spuds on September 10, 2019, 12:37:16 pm
What happened to the die with fire guy, I miss him :D
Title: Re: FTP and the Package Manager
Post by: emanuele on September 10, 2019, 03:00:05 pm
Ohh... well, I didn't say you have to implement the other feature *now*.
/me whistles innocently
Title: Re: FTP and the Package Manager
Post by: radu81 on September 10, 2019, 04:52:19 pm
Maybe my answer was not so honest, the correct answer should be: never used it on elkarte ;)

Quote from: emanuele – On the other hand, I've seen several people asking to support sFTP (or any of the alternatives). And this makes me think someone actually uses it.
I used it on SMF years ago, and probably in the past I've asked for sFTP support since I don't have FTP support on my VPS. I am talking about the possibility to make database backups which is asking for FTP support. There are many other ways to make database backups and the method included in smf/elkarte is probably the last option I would use today. For me it's useless and could be removed, but it's your choice ;)
I'm not even sure this method will work on a big forum with a large database.
Title: Re: FTP and the Package Manager
Post by: emanuele on September 10, 2019, 05:28:17 pm
DB backup is slightly out of scope here. :P
That said...
Spoiler (click to show/hide)
Title: Re: FTP and the Package Manager
Post by: Spuds on September 11, 2019, 09:52:42 am
Anyone know how "other" fora packages deal with permission issues, like xenforo?  Difficult server configs are not unique to us.

For some reason there was an extra spoiler closing tag above, I removed it but don't know if it was a potential bug or just keyboard spam.
Title: Re: FTP and the Package Manager
Post by: radu81 on September 11, 2019, 02:31:52 pm
As far as I know there is no such option in Xf 1.x, 2.1 I need to check but I guess it's the same.
Title: Re: FTP and the Package Manager
Post by: emanuele on September 11, 2019, 02:36:30 pm
Let me try with a Spoiler (click to show/hide)
Looks good. Probably just types it twice...