# user access

**URL:** <https://forums.suse.com/t/user-access/28115>\
**Category:** SLES Configure-Administer\
**Created:** [April 25, 2016, 8:01pm UTC](https://forums.suse.com/t/user-access/28115 "2016-04-25T20:01:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ketter](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@ketter](https://forums.suse.com/u/ketter)\
**Post date:** [April 25, 2016, 8:01pm UTC](https://forums.suse.com/t/user-access/28115/1 "2016-04-25T20:01:10Z")

</div>

I’m coming from an OES/eDirectory background, so pardon my ignorance  
on this. I’ve done some searching, but I appear to be missing  
somthing. I have a SLES 11 sp4 server that I need to give one user  
access to one folder. He needs to be able to add/delete/modify files  
and folders in that one folder. I created a user account, but found  
that he could see more than I wanted him to. So to restrict access to  
that folder, I edited /etc/ssh/sshd\_config and added the following:  
Match user \<the\_username\>  
ChrootDirectory /path/to/folder/  
After restarting sshd, I am unable to login as the user. I’m  
attempting to login via WinSCP. Any suggestions?  
Thanks!  
Ken

* * *

Create and vote for enhancements!  
[https://www.novell.com/products/enhancement-request.html](https://www.novell.com/products/enhancement-request.html)

---

<div class="post-metadata">

**Author:** ![thsundel](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@thsundel](https://forums.suse.com/u/thsundel)\
**Post date:** [April 25, 2016, 8:08pm UTC](https://forums.suse.com/t/user-access/28115/2 "2016-04-25T20:08:58Z")

</div>

[QUOTE=ketter;32348]I’m coming from an OES/eDirectory background, so pardon my ignorance  
on this. I’ve done some searching, but I appear to be missing  
somthing. I have a SLES 11 sp4 server that I need to give one user  
access to one folder. He needs to be able to add/delete/modify files  
and folders in that one folder. I created a user account, but found  
that he could see more than I wanted him to. So to restrict access to  
that folder, I edited /etc/ssh/sshd\_config and added the following:  
Match user \<the\_username\>  
ChrootDirectory /path/to/folder/  
After restarting sshd, I am unable to login as the user. I’m  
attempting to login via WinSCP. Any suggestions?  
Thanks!  
Ken

* * *

Create and vote for enhancements!  
[https://www.novell.com/products/enhancement-request.html](https://www.novell.com/products/enhancement-request.html)[/QUOTE]

Have you tried changing the user home directory to /path/to/folder ?

[http://doc.opensuse.org/documentation/html/openSUSE\_114/opensuse-reference/cha.y2.userman.html#sec.y2.userman.defaults](http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.y2.userman.html#sec.y2.userman.defaults)

Thomas

---

<div class="post-metadata">

**Author:** ![ketter](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@ketter](https://forums.suse.com/u/ketter)\
**Post date:** [April 25, 2016, 11:30pm UTC](https://forums.suse.com/t/user-access/28115/3 "2016-04-25T23:30:32Z")

</div>

On Mon, 25 Apr 2016 17:14:02 GMT, thsundel  
[thsundel@no-mx.forums.microfocus.com](mailto:thsundel@no-mx.forums.microfocus.com) wrote:  
[color=blue]

> ketter;32348 Wrote:[color=green]
> 
> > I’m coming from an OES/eDirectory background, so pardon my ignorance  
> > on this. I’ve done some searching, but I appear to be missing  
> > somthing. I have a SLES 11 sp4 server that I need to give one user  
> > access to one folder. He needs to be able to add/delete/modify files  
> > and folders in that one folder. I created a user account, but found  
> > that he could see more than I wanted him to. So to restrict access to  
> > that folder, I edited /etc/ssh/sshd\_config and added the following:  
> > Match user \<the\_username\>  
> > ChrootDirectory /path/to/folder/  
> > After restarting sshd, I am unable to login as the user. I’m  
> > attempting to login via WinSCP. Any suggestions?  
> > Thanks!  
> > Ken
> > 
> > * * *
> > 
> > Create and vote for enhancements!  
> > [https://www.novell.com/products/enhancement-request.html](https://www.novell.com/products/enhancement-request.html)[/color]
> 
> Have you tried changing the user home directory to /path/to/folder ?
> 
> [http://doc.opensuse.org/documentation/html/openSUSE\_114/opensuse-reference/cha.y2.userman.html#sec.y2.userman.defaults](http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.y2.userman.html#sec.y2.userman.defaults)
> 
> Thomas[/color]

I’ll look into that. I will be out for a day, but I will respond back  
as soon as I have a chance to try it out.  
Thanks!  
Ken

* * *

Create and vote for enhancements!  
[https://www.novell.com/products/enhancement-request.html](https://www.novell.com/products/enhancement-request.html)

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [April 27, 2016, 2:31pm UTC](https://forums.suse.com/t/user-access/28115/4 "2016-04-27T14:31:36Z")

</div>

Hi Ken,

you have not mentioned _how_ that user needs to access to the files in that folder.

Typically, if the user is to log in to that host, the user will need a “home directory”. Please be aware that session-specific (but persistent) files will be stored in that directory, so if you make “your directory” the home directory of that user, extra files will pop up there after login.

If you have files in a different area of the file system, that the user needs to have access to (additionally), you can grant according permissions to that directory (and contents) but will need to make sure that the user can actually traverse the the path from “/” to the target directory.

If the user actually accesses the files from a remote machine, via i.e. NFS or SMB/CIFS, then “sharing” the target directory (and accessing it directly from the client machine) might be a more easy approach. Setting the proper permissions will then depend from the way the remote access is technically handled.

If you decide to follow the “home dir” route, Thomas’ hint on setting the user’s home directory within user management should put you on the right track.

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![ketter](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@ketter](https://forums.suse.com/u/ketter)\
**Post date:** [April 27, 2016, 4:37pm UTC](https://forums.suse.com/t/user-access/28115/5 "2016-04-27T16:37:08Z")

</div>

On Wed, 27 Apr 2016 11:34:02 GMT, jmozdzen  
[jmozdzen@no-mx.forums.microfocus.com](mailto:jmozdzen@no-mx.forums.microfocus.com) wrote:  
[color=blue]

> If the user actually accesses the files from a remote machine, via i.e.  
> NFS or SMB/CIFS, then “sharing” the target directory (and accessing it  
> directly from the client machine) might be a more easy approach. Setting  
> the proper permissions will then depend from the way the remote access  
> is technically handled.[/color]

Jens,  
Thanks for the reminder. I forgot about this method. It actually  
makes more sense for this situation. I will set it up this way.  
Ken

* * *

Create and vote for enhancements!  
[https://www.novell.com/products/enhancement-request.html](https://www.novell.com/products/enhancement-request.html)
