Skip to content

Commit

Permalink
Handle eos EPERM as permission denied (#1183)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic authored Sep 21, 2020
1 parent 84f2c0e commit d635375
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/handle-eos-eperm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Handle eos EPERM as permission denied

We now treat EPERM errors, which occur, eg. when acl checks fail and return a permission denied error.

https://github.com/cs3org/reva/pull/1183
2 changes: 1 addition & 1 deletion pkg/eosclient/eosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (c *Client) executeEOS(ctx context.Context, cmd *exec.Cmd) (string, string,
err = nil
case 2:
err = errtypes.NotFound(errBuf.String())
case 22:
case 1, 22:
// eos reports back error code 22 when the user is not allowed to enter the instance
err = errtypes.PermissionDenied(errBuf.String())
}
Expand Down

0 comments on commit d635375

Please sign in to comment.