SFTP Umask

Hello

I have a SFTP where my folder permission is drwxrwx—
In my sshd_config I put the folow command line: ForceCommand internal-sftp -u 0007

The file permission when the user save in the folder is: RWX------

But, other users can change and delete the file.

Why my file permission isn’t work?

Thanks advanced!

Without being able to look at your setup more closely, I can’t know for sure,
But in general you should know that file permissions in an app like FTP have to be set at two levels…

  • The file system itself (which probably is OK based on what you described)
  • The application (which isn’t described in your post)

The simplest way to setup FTP (and SFTP or FTPS) on openSUSE is to install one of the FTP apps supported by yast2-ftp-server… You install that package with something like proftp or pureftp (IIRC those two are supported by yast).

You’ll then get an ftp server applet in YAST will manage all your permissions to support setting up users logging in and certificates to setup secure connections.

Eg:
After removing your existing FTP app (you wouldn’t want contention)

zypper in proftpd yast2-ftp-server

Then look for your FTP Server applet in YAST

HTH,
TSU