New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont change /usr/local owner to root in mac #2252

Closed
Paxa opened this Issue Mar 20, 2015 · 14 comments

Comments

Projects
None yet
4 participants
@Paxa

Paxa commented Mar 20, 2015

After I install wkhtmltopdf from package homebrew stop working.

As I find out /usr/local, /usr/local/bin, /usr/local/lib, /usr/local/share, ... was owned by root, but suppose to be owned by current user and have group admins.

@metaljoe

This comment has been minimized.

metaljoe commented Mar 24, 2015

I was wondering what had happened with my homebrew installation recently - the permissions in /usr/local have changed. It broke around the time I installed wkhtmltopdf, so I seem to have experienced the same problem as you.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Apr 5, 2015

What were the exact permissions (ls -al) before and after installation?

@ashkulz ashkulz added the NeedInfo label Apr 5, 2015

@scottjacobsen

This comment has been minimized.

scottjacobsen commented Jun 24, 2015

My exact directory ownership for /usr/local and everything underneath was "scott:admin". After installing wkhtmltopdf /usr/local and several subdirectories (lib, man, share, etc) had their ownership changed to "root:wheel"

The wkhtmltopdf installer should not change ownership of directories.

Re Homebrew/homebrew-cask#12093

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jun 25, 2015

@scottjacobsen: I don't have or use a Mac, so can you confirm if tar accepts the flag described below:

 --no-overwrite-dir
           preserve metadata of existing directories

If so, can you check if changing scripts/build.py:1219 to

tar xf --no-overwrite-dir $BASEDIR/app.tar

and rebuilding the package does not change the permissions?

@scottjacobsen

This comment has been minimized.

scottjacobsen commented Jul 4, 2015

Sadly no

scott@endor ~% tar --version
bsdtar 2.8.3 - libarchive 2.8.3
scott@endor ~% which tar
/usr/bin/tar
@ashkulz

This comment has been minimized.

Member

ashkulz commented Jul 4, 2015

Hmm, according the manpage the equivalent flag seems to be --no-same-owner, can you try changing it as mentioned above and see if the owner/group does not get changed?

@ashkulz ashkulz added Verified and removed NeedInfo labels Jul 4, 2015

@ashkulz ashkulz added this to the 0.12.3 milestone Jul 4, 2015

@scottjacobsen

This comment has been minimized.

scottjacobsen commented Jul 4, 2015

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jul 4, 2015

I think that the equivalent option is -o, can you try with that? I'm not too comfortable with the cp approach, as there is a small window of opportunity for someone to copy files into the /tmp subdirectory and finally end up in /usr/local/.

@scottjacobsen

This comment has been minimized.

scottjacobsen commented Jul 4, 2015

-o appears to do the right thing. I tested with a few tar files. Building
the project seems to be non trivial, so I haven't done that yet.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jul 4, 2015

Not too sure about the syntax that tar on OS X accepts, does it have to be tar -o xf $BASEDIR/app.tar or something else?

@scottjacobsen

This comment has been minimized.

scottjacobsen commented Jul 4, 2015

@ashkulz ashkulz closed this in 11c0a53 Jul 4, 2015

@ashkulz ashkulz added Fixed and removed Verified labels Jul 4, 2015

@Paxa

This comment has been minimized.

Paxa commented Jul 4, 2015

Thank you

DanielCeregatti added a commit to DanielCeregatti/wkhtmltopdf that referenced this issue Jul 8, 2015

fix ownership of /usr/local being changed during installation on OS X
Passing the -o flag to tar should preserve them and fix wkhtmltopdf#2252.
@ashkulz

This comment has been minimized.

Member

ashkulz commented Jul 14, 2015

A preview for the next release 0.12.3-dev-79ff51e is available, which should contain the fix for this issue. Please report back if it is not solved with the above version.

Please note that the above downloads will be removed after the 0.12.3 release.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jan 21, 2016

0.12.3 has been released, which should contain the fix for this issue. Please report back if it is not solved with the above version.

Note that the preview downloads mentioned above have been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment