Summary
chicken-install uses user umask
Metadata
- Id: 206eed618659b260a3746544e624e934b6837c21
- Trac id: 773
- Type: defect
- Reporter: retroj
- Owner: kon
- Cc: retroj
- Status: closed
- Component: unknown
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone:
- Version: 4.7.x
- Changetime: 2014-10-04 21:56:33 UTC
- Created: 2012-01-08 02:24:11 UTC
- Keywords: chicken-install umask
Description
I use a umask of 027 for my user account on my computer, meaning that by default, files I create are not readable by others. This causes a problem when I install some eggs with 'sudo chicken-install foo' or 'chicken-install -s foo', because some installed files are installed with the umask of my user account in effect, even though they are owned by root:root.
$ umask 0027 $ chicken-install -s setup-helper <OUTPUT ELIDED> $ ls -la /usr/share/chicken total 48 drwxr-xr-x 3 root root 4096 Jan 7 20:18 . drwxr-xr-x 271 root root 12288 Jan 2 20:42 .. drwxr-xr-x 2 root root 4096 Feb 10 2010 doc -rw-r----- 1 root root 4900 Jan 7 15:45 inline-type-checks.scm -rw-r--r-- 1 root root 787 Sep 5 11:03 setup.defaults -rw-r----- 1 root root 13435 Jan 7 20:18 setup-helper.scm
Note lack of read permission for non-root users for two files above. This causes subsequent problems when installing other eggs whose setup requires to read these files. It happens with other eggs too, not just setup-helper.
Changes and comments
[2012-03-04 15:37:06 UTC] ckeen wrote:
hm, does this differ from running sudo chicken-install setup-helper?
[2012-03-04 15:39:33 UTC] ckeen changed status from new to accepted
[2012-03-04 15:39:33 UTC] ckeen set owner to ckeen
[2012-03-04 15:39:33 UTC] ckeen wrote:
The reason for this seems to be that under the hood cp(1) is used to copy files. install(1) would be a better candidate IMHO
[2012-03-04 15:56:52 UTC] ckeen wrote:
Also setup-helper is an oddball since it implements its own copy routine instead of using setup-api's install-extension which would do a chmod a+r for all copied files.
[2012-03-11 20:51:22 UTC] ckeen changed status from accepted to assigned
[2012-03-11 20:51:22 UTC] ckeen changed owner from ckeen to kon
[2012-03-11 20:51:22 UTC] ckeen wrote:
Kon could you have a look at this please?
[2012-04-01 01:03:26 UTC] kon changed status from assigned to accepted
[2012-04-01 01:03:26 UTC] kon wrote:
Release 1.3.2 does nothing to ease this. But after installing setup-helper 1.3.2 delete the copy in Chicken Home, leaving the copy in the Chicken Repository, which will have the proper permissions.
[2012-04-15 02:54:04 UTC] kon wrote:
For something like SRFI 29 bundles install-extension is no help. Perhaps the setup-api copy-file might set the permissions.
[2012-05-04 08:59:44 UTC] felix removed milestone 4.8.0
[2014-09-15 22:50:14 UTC] retroj set cc to retroj
[2014-09-15 22:50:14 UTC] retroj wrote:
bump. any ideas on this?
[2014-10-04 21:56:33 UTC] kon changed status from accepted to closed
[2014-10-04 21:56:33 UTC] kon set resolution to fixed
[2014-10-04 21:56:33 UTC] kon wrote:
setup-helper uses the "setup-api:install-extension" for extensions, since 1.0.0. It cannot use it for srfi-29 bundles.
The "setup-helper.scm" in ".../share/chicken" is not referenced by a current egg. (All eggs "(use setup-helper-mod)".)
While some eggs still place files in CHICKEN_HOME the files are also placed in the chicken repo using install-extension. Use CHICKEN_INCLUDE_PATH.
I released setup-helper:1.5.4 & srfi-29:2.3.2 which perform "chmod"/"sudo chmod" of 'a+rx & 'a+r for the path tree of a srfi-29 bundle.