Skip to content

Commit

Permalink
Merge pull request #478 from tommie/eaccess
Browse files Browse the repository at this point in the history
Translate EACCES to PERMISSION_DENIED.
  • Loading branch information
puellanivis authored Oct 30, 2021
2 parents 858320b + 20a9511 commit 7adab6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stat_posix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !plan9
// +build !plan9

package sftp
Expand All @@ -23,7 +24,7 @@ func translateErrno(errno syscall.Errno) uint32 {
return sshFxOk
case syscall.ENOENT:
return sshFxNoSuchFile
case syscall.EPERM:
case syscall.EACCES, syscall.EPERM:
return sshFxPermissionDenied
}

Expand Down

0 comments on commit 7adab6c

Please sign in to comment.