mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
fix copy in exec permission
This commit is contained in:
parent
9898c301d5
commit
2b11c31b60
@ -88,7 +88,8 @@ func handleCopyIn(s *unixsocket.Socket, cmd *Cmd, msg *unixsocket.Msg) error {
|
|||||||
}
|
}
|
||||||
defer inf.Close()
|
defer inf.Close()
|
||||||
|
|
||||||
outf, err := os.OpenFile(cmd.Path, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0666)
|
// have 0777 permission to be able copy in executables
|
||||||
|
outf, err := os.OpenFile(cmd.Path, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return sendErrorReply(s, "copyin: open write file %v", err)
|
return sendErrorReply(s, "copyin: open write file %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user