Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to restrict the user allowed to access by sftp #606

Open
wants to merge 1 commit into
base: stretch-unstable
from

Conversation

@Josue-T
Copy link
Contributor

commented Dec 28, 2018

The problem

Actually the can't restrict the user allowed to access by sftp.

All user are allowed to read the content of the root directory.

The directive Match User sftpusers in the sshd config never worked.

Solution

Update the ssh config.

Add the possibility to define which user is allowed to access by sftp with the permission concept see #585.

PR Status

This PR depends of #585 .

Can be tested and reviewed.

How to test

By default this feature is disabled. To enable it type :

yunohost user ssh enable-permission
yunohost service regen-conf -f ssh

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@Josue-T Josue-T requested review from Psycojoker, zamentur and alexAubin Dec 28, 2018

@@ -288,6 +288,21 @@ user:
key:
help: The key to be removed

### user_ssh_enable_permission()
enable-permission:

This comment has been minimized.

Copy link
@alexAubin

alexAubin Jan 7, 2019

Member

Eh, I'm confused about :

  • the naming : if the purpose is to enable sftp, why call this enable-permission and not enable-sftp ?
  • from what I understand from the PR description, the purpose it to enable sftp per user .. but this does something on a global basis - so is the purpose to enable it per user, or globally ...?

This comment has been minimized.

Copy link
@Josue-T

Josue-T Jan 7, 2019

Author Contributor

No, by default we keep sftp enabled as it's the case now. We just add the possibility define which user/group is allowed to access by sftp.

This comment has been minimized.

Copy link
@alexAubin

alexAubin Jan 7, 2019

Member

But this doesn't take any 'user' argument so in what sense is it per user/group ? To me this look just like a toggle on/off to enable or not SFTP ? (And therefore makes me wonder if it shouldn't just be a setting instead ?)

This comment has been minimized.

Copy link
@Josue-T

Josue-T Jan 7, 2019

Author Contributor

Well,

Maybe I forgot to explain this.

When you enable the permission, you have a new permission named main.sftp.and after you will manage the permission by the permission command see #585 .

@alexAubin alexAubin added this to the 3.5.x milestone Jan 15, 2019

@alexAubin alexAubin modified the milestones: 3.5.x, 3.6.x Mar 18, 2019

@alexAubin alexAubin modified the milestones: 3.6.x, 3.7.x Jul 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.