Missing sftp-server argument -m force_file_perms

Bug #2052618 reported by Karmazyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
New
Undecided
Unassigned

Bug Description

In Centos, RHEL, ... openssh-server package with sftp-server has an option
-m force_file_perms
Sets explicit file permissions to be applied to newly-created files instead of the default or client requested mode. Numeric values include: 777, 755, 750, 666, 644, 640, etc. Using both -m and -u switches makes the umask (-u) effective only for newly created directories and explicit mode (-m) for newly created files.

This option is missing in Ubuntu 22.04.3 LTS
Code patch from Fedora:
https://src.fedoraproject.org/rpms/openssh/raw/f34/f/openssh-6.7p1-sftp-force-permission.patch

SFTP put command is sending source filemask to the remote server as is.
For shared folders there is a risk sender will generate a file, which another user can not read.
That's why there is force_file_perms to force filemask on shared sftp accounts no matters what filemask had source file on client side.

This feature is welcome to migrate from RHEL to Ubuntu.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: openssh-server 1:8.9p1-3ubuntu0.6
Uname: Linux 5.15.0-200.131.27.1.el9uek.x86_64 x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Wed Feb 7 10:22:50 2024
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Karmazyn (heksik1024) wrote :
Revision history for this message
Paride Legovini (paride) wrote :

This is a duplicate of LP: #1922130, marking it as such.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.