Linux version 2.6.32-504.1.3.el6.x86_64
CentOS release 6.6
I am connecting to the server via SFTP (FileZilla client) with an SSH key as the user that owns the web directory (let's call it fred
). When I upload files, they have fred
as the file's owner and group, but the file permissions are 0000 (displayed as ----
). Obviously I don't want to have to change the permissions for every file I upload. I realize this is a umask issue, and I have tried suggestions on other websites. I've added umask 022
to the .bashrc
file. I've logged in as the root user and edited the sshd_config
file so that one of the lines is as follows:
Subsystem sftp /bin/sh -c 'umask 022; /usr/libexec/openssh/sftp-server'
But none of these things have solved the problem. I don't know where I'm going wrong.
EDIT: I used NetBeans to upload a file using the same connection and the file has the correct permissions on the server, so there must be something misconfigured in FileZilla.