Missing sftp-server argument -m force_file_perms
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:/
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-
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
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)
This is a duplicate of LP: #1922130, marking it as such.