Bug #27789 | Wrong permissions of files/direcories disturb "sudo make install" | ||
---|---|---|---|
Submitted: | 12 Apr 2007 18:04 | Modified: | 25 Oct 2007 0:31 |
Reporter: | Hartmut Holzgraefe | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S3 (Non-critical) |
Version: | 5.0, 5.1 (didn't check 4.1) | OS: | Linux |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[12 Apr 2007 18:04]
Hartmut Holzgraefe
[12 Apr 2007 18:05]
Hartmut Holzgraefe
Just found this to be a duplicate of Bug #19738 i'm not sure what the patches in that bug report may have fixed but defiently not the problem at hand.
[12 Apr 2007 18:26]
Hartmut Holzgraefe
Correcting myself: these are generated directories which are not maintained within the repository. So new suggested fix: create these directories with the correct permissions
[12 Apr 2007 18:54]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/24411 ChangeSet@1.2453, 2007-04-12 20:54:38+02:00, hartmut@mysql.com +1 -0 Fixed Bug #27789 "Wrong permissions of sql/share/language directories"
[13 Apr 2007 12:11]
Hartmut Holzgraefe
changed the bugs subject as i found more not world-readable files breaking a "sudo make install" if on a non-local FS: find . -not -perm +0006 | grep -v BitKeeper shows a lot of non-world-readable files in mysql-test, a "sudo make install" fails on these, too, as it can't copy the test/result files that are not readable ...
[13 Apr 2007 12:37]
Hartmut Holzgraefe
ooops, 0004 is read, 0006 is read and write find . -not -perm +0004 | grep -v BitKeeper is the right statement to identify these
[13 Apr 2007 23:13]
Sergei Golubchik
permissions aren't wrong - they are what you asked for. Changing umask in comp_err is not enough, it does not affect files generated during make - e.g. mysqld binary. If your setup requires your generated files to be world-writable - set your umask appropriately.
[15 Apr 2007 10:18]
Hartmut Holzgraefe
My system umask is 0002, so only preventing world write access to user created files, it is my_mkdir() that promotes it down to user read/write only, and that is what my patch is supposed to fix.
[15 Apr 2007 10:32]
Hartmut Holzgraefe
umask 0002, without my patch: created directories not world readable, sudo install fails umask 0002, with my patch: created directories world readable, sudo install succeeds umask 0077, with my pacht: created directories not world readable, sudo install fails again only in the last case the "permissions aren't wrong - they are what you asked for" argument holds, in that case i really get what i asked for. Problem is that my_mkdir() does not only do flags & ~user_umask as system mkdir would do, but actually does (flags & my_umask_dir) & ~user_umask so overriding the users umask setting which is ok for its usual use case from within the server but not for the user level tools, especially not for those that are part of the build process. By setting my_umask_dir to 0777 in comp_err.c i'm merely restoring the system mkdir behavior as now all bits of my_umask_dir are set so that no additional library masking of bits happens.
[15 Apr 2007 11:20]
Sergei Golubchik
Ok, agree. I would never expect comp_err to modify user's umask. Now I wonder, does this messing with umask belong to my_init() ? I think it should be moved to mysqld.cc.
[23 Apr 2007 20:49]
Timothy Smith
Hartmut, Please push your patch to 5.0-maint. I've opened bug #28043 in regards to setting mysqld's default umask values in mysqld.cc. Thanks, Timothy
[24 May 2007 10:25]
Magnus Blåudd
Hartmut, putting this in my list so itäs not forgotten.
[5 Oct 2007 17:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/35006 ChangeSet@1.2484, 2007-10-05 19:55:00+02:00, msvensson@pilot.mysql.com +1 -0 Fixed Bug #27789 "Wrong permissions of sql/share/language directories"
[18 Oct 2007 21:34]
Bugs System
Pushed into 5.1.23-beta
[18 Oct 2007 21:36]
Bugs System
Pushed into 5.0.52
[25 Oct 2007 0:31]
Paul DuBois
Noted in 5.0.52, 5.1.23 changelogs. comp_err created files with permissions such that they might not be accessible during make install operations.