[GHC] #8058: If .ghci is a symlink, permissions aren't read correctly
GHC
ghc-devs at haskell.org
Tue Sep 24 12:08:22 CEST 2013
#8058: If .ghci is a symlink, permissions aren't read correctly
-------------------------------+-------------------------------------------
Reporter: berdario | Owner:
Type: bug | Status: closed
Priority: low | Milestone:
Component: GHCi | Version: 7.6.2
Resolution: invalid | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Easy (less than 1 hour)
Type of failure: Other | Blocked By:
Test Case: | Related Tickets:
Blocking: |
-------------------------------+-------------------------------------------
Comment (by berdario):
Uhm, "writable by someone else" seems to include the group, even if the
group "dario" doesn't include any user other than "dario" himself.
Why does ghci care about the permissions of the parent directory by the
way? I just tried and it seems that on linux, having writing permissions
for a directory isn't enough to move it away (and substitute it with a
malicious one)
(fwiw: this is a linux box with hostname "macbook", not macosx... sorry
for the confusion)
So, if for some reason (other unices?) we really need to check the
permissions of the parent directory, the error message may mention it
Also, "someone else" is quite a fuzzy concept... "has to have write
permission for only your user" might be better?
{{{
dario at macbook ~> ls -ld (dirname (readlink .ghci))
drwxrwxr-x 7 dario dario 4096 Sep 12 22:19 /home/dario/.dotfiles/dotfiles/
dario at macbook ~> ghci
GHCi, version 7.6.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
*** WARNING: /home/dario/.dotfiles/dotfiles is writable by someone else,
IGNORING!
Prelude>
Leaving GHCi.
dario at macbook ~> chmod g-w (dirname (readlink .ghci))
dario at macbook ~> ghci
GHCi, version 7.6.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude>
Leaving GHCi.
}}}
Thank you
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8058#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list