Parent directory is world writable but not sticky

(Mike Boers) #1

Hey folks.

There is another similar topic, but it seems constrained to atlassian-cli.

I’m getting a parent directory is world writable but not sticky error during many operations. I’m getting it on Homebrew on macOS 10.11 and 10.12, and Linuxbrew on CentOS 7.

My Homebrew is in a non-standard location (/usr/local/vee/homebrew), and I’ve also overridden the location of the cache (/usr/local/vee/homebrew/Cache) and logs (same pattern).

I’m a Python dev, and don’t know how to properly debug Ruby, so I’m installing puts all over the place to try to figure it out. My apologies for not knowing how to actually do this.

It seems like there are a few different code paths, but they all go through

/usr/local/vee/homebrew/Library/Homebrew/extend/pathname.rb:167:in `atomic_write'

Printing out the path returned from Dir.mktempdir, I get:

  • /usr/local/vee/homebrew/Cache/.d20181106-21948-1xpbf73/.linkage.json20181106-21948-pef1lk
  • /usr/local/vee/homebrew/Cellar/gmp/6.1.2_2/.d20181106-21948-zs3nsx/.INSTALL_RECEIPT.json20181106-21948-1ppv98h

and a few others.

What seems very strange is that sometimes INSTALL_RECEIPT ones go through, and sometimes not.

Does anyone have any ideas here? This seems like it started recently, maybe with changes to how atomic write works.


(Sean Molenaar) #2

Since this seems like a bug in homebrew/brew could you file an issue there?

(Mike Boers) #3

Honestly, that is where I went first, but since I hadn’t yet tried reproducing it with a minimal setup outside of the environment I was in, I thought it would get shot down.

I’ll, uh, try to reproduce it first. Even if I can’t I’ll turn it into a GitHub issue.

(Chukka) #4
Hi @mikeboers @SMillerDev ,

I'm facing same issue .Did you find any fix or workaround for the same ?

    cp -pR /private/tmp/d20181114-23401-e6588c/atlassian-cli-8.0.0/. /private/tmp/atlassian-cli-20181114-23401-wgbzj1/atlassian-cli-8.0.0

    /usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'

    ArgumentError: parent directory is world writable but not sticky

    1. raise

    2. ignore

    3. backtrace

    4. irb

    5. shell

    Choose an action:`

(Mike Boers) #5


That seems like the more typical reason for that error. See