From owner-freebsd-questions@FreeBSD.ORG Sat May 31 07:24:12 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7CA31065675 for ; Sat, 31 May 2008 07:24:12 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from mail.irbisnet.ru (mail.irbisnet.ru [194.186.18.2]) by mx1.freebsd.org (Postfix) with ESMTP id 288998FC17 for ; Sat, 31 May 2008 07:24:11 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from [192.168.1.2] ([85.172.11.149]) (authenticated bits=0) by mail.irbisnet.ru (8.14.2/8.14.2) with ESMTP id m4V7O8L1096826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 31 May 2008 11:24:10 +0400 (MSD) (envelope-from yuri.pankov@gmail.com) Message-ID: <4840FD02.1010306@gmail.com> Date: Sat, 31 May 2008 11:23:46 +0400 From: Yuri Pankov User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Turner Litigation Services References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: ssh - connect to directory outside of /user/home - permission denied X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2008 07:24:12 -0000 Turner Litigation Services wrote: > How do you allow ssh to permit connections to a folder outside of the /home > folder of the user loggin in to ssh? For example, i want to sync two > folders > (using unison) on different machines and need to ssh to the remote folder .. > > but the folder is a shared folder outside of my home folder > (i.e. /user/data/pub). > > ssh [username]@[servername] works to get me into the user folder and I can > cd > to the folder I need to access (and have proper perms there) > > But, I need to connect to the folder directly to use unison (file/directory > synchronization tool). > > ssh [username]@[severname] /usr/data/pub/ gives permission denied errors. ^^^^^^^^^^^^^^ You are specifying a command to run once ssh connects, not the path to chdir to. > I've heard the directory path needs to be relative to the home path but the > following does not work either: > > ssh [username]@[servername] ../../../usr/data/pub/ (where the default > directory for ssh logins is /usr/home/[username]/.) > > I've tried formatting variations of the above themes to no avail and suspect > > there's a setting somewhere to allow what directories ssh connections can be > > made to, or creating a link in [users] home directory to the public > directory. Your help would be appreciated. > You could use something similar to: ssh [username]@[servername] 'cd /usr/data/pub; unison .........' HTH, Yuri