A
A
Anatoly2019-07-26 11:12:21
CentOS
Anatoly, 2019-07-26 11:12:21

How to solve the problem when creating directories and files via SFTP?

Good afternoon.
When creating a directory via SFTP through filezilla, the rights are set to 755.
How can I make sure that when creating a directory, the directory is created with rights 775?
Maybe there is an opportunity to specify for a specific user that all directories and files are created with rights 775?
OS on CentOS 7 server

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2019-07-26
@les-anatoliy

The problem is solved, if this is useful to anyone, then here It is
necessary to add the following line to the /etc/ssh/sshd_config file:
Subsystem sftp /bin/sh -c 'umask 002; /usr/libexec/openssh/sftp-server'

S
Sergey, 2019-07-26
@feanor7

What ftp server do you have installed there?
if vsftpd then there is a local_umask=0002 parameter, the two will just subtract from 777

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question