Skip to content

How to set shared directory and permissions for user? #539

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

Closed
togosh opened this issue Feb 23, 2017 · 11 comments
Closed

How to set shared directory and permissions for user? #539

togosh opened this issue Feb 23, 2017 · 11 comments

Comments

@togosh
Copy link

togosh commented Feb 23, 2017

With FileZilla I had a GUI to perform these actions:
https://wiki.filezilla-project.org/wiki/images/f/f5/FZS_aliases.png

Im totally new to OpenSSH, I have SFTP setup on a windows server, I can log in with my windows account,
I set up another windows account using:

net user username password /add

but when connecting in that user has access to everything.

Modifying sshd_config file

#ChrootDirectory none

and replacing none with a path and removing # seemed to change the default starting directory when logging in, but I could still poke around all over the system

Questions:
How do I restrict a user to only have access to a certain directory?
How do I set a users read/write permissions?

References:
#190

#140

#381

#478

#3

@togosh
Copy link
Author

togosh commented Feb 24, 2017

I ended up ditching Windows and going with Ubuntu, these are the steps I followed:
http://askubuntu.com/questions/420652/how-to-setup-a-restricted-sftp-server-on-ubuntu/607898#607898

@manojampalam
Copy link
Contributor

CHROOT is a UNIX feature that's not supported in Windows.
SFTP subsystem (sftp-server.exe) on Windows ends up getting launched as your Windows user. You will need to use the standard Windows ACLing to control access to files (and other resources).

@mrPsycho
Copy link

mrPsycho commented May 1, 2017

@manojampalam and how to change disk to D in sftp browser?

@bagajjal
Copy link
Collaborator

bagajjal commented May 1, 2017

@mrPsycho use "cd d:"

@mrPsycho
Copy link

mrPsycho commented May 1, 2017

@bagajjal thanks, captain.
but tell it to the end users, who uses filezilla or cyberduck

@bagajjal
Copy link
Collaborator

bagajjal commented May 2, 2017

If you are using third party software then you need to browse to the corresponding drive..

image

As of now "/" ( root ) only shows the C drive.. There is already a fix, which will be pushed in the next release..

@mrPsycho
Copy link

mrPsycho commented May 2, 2017

@bagajjal thanks a lot!

@smaug9
Copy link

smaug9 commented May 2, 2017

@bagajjal: ETA for next release?
Also, confirmed that mounting a volume in an empty folder on the C:\ drive and connecting via winscp fails.

@manojampalam manojampalam added this to the May-End milestone May 4, 2017
@manojampalam
Copy link
Contributor

manojampalam commented May 23, 2017

Fix involves changes to dirent.c. Ensure changes in PowerShell/openssh-portable#47 are also incorporated if needed.

@helplessJ
Copy link

Thud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants