dbuenzli / down

An OCaml toplevel (REPL) upgrade
http://erratique.ch/software/down
ISC License
84 stars 3 forks source link

A failure due to missing file permission in `~/.config/ocaml/session` #36

Closed aqjune closed 5 months ago

aqjune commented 5 months ago

I might be missing something, but in WSL2 Ubuntu, Down.Session.edit is failing because ~/.config/ocaml/session/ does not have +x permission:

$ cd ~
$ ls -al
drw-r--r--  2 aqjune aqjune 4.0K May  4 00:15 .config

To make Down.Session.edit successful, chmod +x must be given to all three directories .config,.config/ocaml,.config/ocaml/session/.

# Down.Session.edit "mysession";;
Error: /home/aqjune/.config/ocaml: Permission denied
Error: /home/aqjune/.config/ocaml: Permission denied
val it : unit = ()
# Down.Session.edit "mysession";;
Error: /home/aqjune/.config/ocaml/session: Permission denied
Error: /home/aqjune/.config/ocaml/session: Permission denied
val it : unit = ()
# Down.Session.edit "mysession";;
Error: /home/aqjune/.config/ocaml/session/last: Permission denied
Error: /home/aqjune/.config/ocaml/session/mysession.ml: Permission denied
val it : unit = ()
nojb commented 5 months ago

Oops, I think this is my fault:

https://github.com/dbuenzli/down/blob/5b557f38226974ca6e98827dc61e9e5ee57464a7/src/down_std.ml#L287

should be 0o755.

Apologies.

dbuenzli commented 5 months ago

No worries a good reviewer would have spotted that :-). On a fix.

aqjune commented 5 months ago

thanks! :)