[TriLUG] Proper way to allowing remote sftp to nginx web server
Lance A. Brown via TriLUG
trilug at trilug.org
Fri Apr 1 11:29:35 EDT 2016
On 4/1/2016 10:13 AM, Ronald Kelley via TriLUG wrote:
> Greetings all.
>
> I need to allow remote sftp access to one of our servers for some web
> development. I have setup a chroot sftp environment (per
> https://wiki.archlinux.org/index.php/SFTP_chroot) but am running into
> a permissions dilemma and need some advice.
If everyone is working inside the same directory you can use group
sticky bit behavior to manage your permissions. When 'chmod g+s' a
directory, any files created within that directory get the group
ownership assigned to the directory. So if you have
drwxr-sr-x. 5 nginx nginx 4096 Feb 28 01:57 /var/www/html
Any files created in /var/www/html by whomever, will be put in the group
nginx.
More details than you can shake a stick at about permissions and sticky
bits: http://blog.superuser.com/2011/04/22/linux-permissions-demystified/
--[Lance]
More information about the TriLUG
mailing list