[Bug 1436] New: scp -p does not preserve sticky bit (01000)

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Mon Feb 4 22:02:33 EST 2008


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 at mindrot.org
        ReportedBy: openssh-bugzilla at 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 at 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.


More information about the openssh-bugs mailing list