I'm trying to give user2
access only to his home directory and full permissions on /cygdrive/e
. I created a Data/
directory within his $home
, added a bind
directive in /etc/fstab
(see below), and issued a mount -a
.
I've got cygwin installed and sshd running (OpenSSH_6.1p1). When connecting with ChrootDirectory
enabled in an sftp subsystem, ~/Data
appears to have no contents. Even if I change the permissions for /cygdrive/e
recursively to 0777
, the result is the same. With ChrootDirectory
active for that user in sshd_config
, no contents are displayed.
However, connecting using the same user account without changing any permissions, the contents of ~/Data
is fully populated after I comment out the Subsystem
section at the bottom of sshd_config
and restart sshd.
So how can I grant this cat god-mode permission on /cygdrive/e
without giving him the ability to browse any other part of the filesystem? What am I missing?
The bottom of my sshd_config
is as follows:
Subsystem sftp internal-sftp
Match User user2
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
The only line in /etc/fstab
reads as follows:
/cygdrive/e /home/user2/Data none bind,posix=0,user
Currently, recursive ownership of /cygdrive/e
belongs to Administrators:Users
. The user2
Windows account is a member of Users
as well as Administrators
. All directories have a mask of 0755
. All files have a mask of 0644
.
I'm not crazy about user2
having admin rights to the machine, but I'll deal with that later. One problem at a time.