YunoHost-Apps / grav_ynh

Grav, a flat-file CMS packaged for YunoHost
https://getgrav.org/
GNU General Public License v3.0
16 stars 12 forks source link

FTP access ? #107

Closed tr1p0p closed 1 year ago

tr1p0p commented 2 years ago

Like it's been said A LOTS on the grav documentations. User need a proper FTP access to /var/www/grav folders to easily create folders and modular pages, for example. Things admin plugin seem to don't handle well (?!?)

So... Why grav (whith a star and said that a well managed and good package) don't send any info on the admin mail in the creation ? Why the user don't have FTP access to /var/www/grav (i figure it's because app is a user, but.. it's not very practical at all then).

Because if it's AGAIN a app that need admin SSH and sudo to just... create folders put files and edit them, it's like not usable at all then. It's not a "easy CMS" if it retire this easy access to grav folder, and so, the website.

For some reasons, waht i said here didn't found anywhere on the README, didn't have a issues or some steps to just... access the grav folders.

Permissions should protect user, yeah, but not take away possibility of an web app

tituspijean commented 2 years ago

Let me rephrase for me:

tituspijean commented 2 years ago

@tr1p0p there. Upgrade with the following command, enable SSH/SFTP access in the app's config panel, and let me know if you are satisfied.

yunohost app upgrade grav -u https://github.com/YunoHost-Apps/grav_ynh/tree/ssh-ftp -F

tr1p0p commented 2 years ago

Ok well i update my grav with this but it don't seem to work for the credentials i think my app use (i mean it's grav, right ?) get acces denied on filezilla or ssh terminal.

I activate ssh sftp acces in app's config panel, try to change password and all but don't seem to work.

I mean to acces my app i need to log in with grav and my password i put on app panel, right ?

EDIT : Oh, it just password don't change, it give a password that work. But user cannot really see it then.. (but with password manager like on firefox i can show it after when it offer me to save it)

But yeah, sftp and ssh access work ! So i guess it just need like a mail sent to the admin to give credentials.

Thanks for making this app better (grav is really great !)

tituspijean commented 2 years ago

I only populated it with a random password. You should be able to change it and it should work directly though. Can you describe what happens if that does not work?

I'll update the README to better explain what to do.

tr1p0p commented 2 years ago

Well, i put like a passphrase, save, no error message, but the pass i put just didn't work. And go back to app settings seem to put a new FTP password (that, then work)

tituspijean commented 2 years ago

So you mean you had to change the password twice for it to work?

Qprq commented 2 years ago

@tr1p0p there. Upgrade with the following command, enable SSH/SFTP access in the app's config panel, and let me know if you are satisfied.

yunohost app upgrade grav -u https://github.com/YunoHost-Apps/grav_ynh/tree/ssh-ftp -F

I am satisfied!

I followed your directions, and everything works as intended (sftp and ssh).

Thank you for this valuable addition to this app.

cloo commented 2 years ago

I still cannot use Grav via FTP, and I'm confused by the system of users.

If I understand correctly, there are at least three levels of users here:

  1. Yunohost user (my SSO), which somehow can be used as login to Grav
  2. Grav user, "admin", which was created via Yunohost. It is magically connected to my Yunohost SSO user (which has a different name), and uses its password.
  3. Linux user named "grav", who owns all files and folders, has no visible password, and as you wrote here, it should be used for ftp access.

My SSO and "admin" password does not work for "grav" account when logging via FTP.

I can strangely login via FTP using "admin", but I cannot edit files:

220606-010701

The upgrade command which was provided here worked with ambiguous response, with both failure and success lines, not sure what to think :) It also suggested to upgrade via web ui, which I did. After that tried this command again, and it worked exactly the same way. Didn't help with ftp though.

220606-004329

So.. I'd be thankful for some help for ftp login..

Qprq commented 2 years ago

@cloo the standard version of the app has no FTP access. If you install the ssh-ftp branch as described here, you will be able to activate such access by going to the config page of the app in yunohost admin (🏠/Applications/grav + clic on the yellow button). You will setup a password to use with the grav user to connect with ssh or sftp (port 22).

cloo commented 1 year ago

Sorry, it still does not work.

tituspijean commented 1 year ago

Sorry, but I cannot replicate your issue.

  1. Grav 1.7.34~ynh1

  2. Enabled SSH/SFTP in the app config panel and set my own password: image

  3. Logged in with Filezilla with user grav and set password, and was able to edit files: image

Do not attempt to use any other user than grav (or grav__2, etc. if you have multiple Grav instances). It will not work. If your issue persists, please open a dedicated issue or a forum thread with as many logs and screenshots as possible to understand what you are doing. Especially, share the output of ls -la /var/www/grav.

cloo commented 1 year ago

Oh, then it works. Thanks. I never thought about using username "grav" :) - I have "admin" and another for yunohost ;) It would be good to write it in the docs, or even better, in UI where you enable ssh.

cloo commented 1 year ago

@tituspijean, just a separate public thanks for doing this. Now we have fully usable Grav on Yunohost!

tituspijean commented 1 year ago

It would be good to write it in the docs, or even better, in UI where you enable ssh.

My bad here... it was so obvious for me that writing it out went over my head.