Mailing List Archive

[Bug 1436] New: scp -p does not preserve sticky bit (01000)
https://bugzilla.mindrot.org/show_bug.cgi?id=1436

Summary: scp -p does not preserve sticky bit (01000)
Classification: Unclassified
Product: Portable OpenSSH
Version: 4.7p1
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: scp
AssignedTo: bitbucket@mindrot.org
ReportedBy: openssh-bugzilla@janacek.sk


Overview:
When using scp -rp to copy a directory with sticky bit on (such as
/tmp), the sticky bit is not preserved.

Reproduction:
Create a directory dir with permissions 1777. Then use
scp -rp dir user@otherhost:
The resulting directory on the otherhost will have permissions of 0777
instead of 1777. From the security point of view this may considered a
serious problem.

Location of the problem:
in scp.c the FILEMODEMASK does not include the sticky bit (S_ISVTX).

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs