Opened 6 years ago

Closed 3 years ago

#773 closed defect (fixed)

chicken-install uses user umask

Reported by: retroj Owned by: kon
Priority: major Milestone:
Component: unknown Version: 4.7.x
Keywords: chicken-install umask Cc: retroj
Estimated difficulty:

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.

Change History (9)

comment:1 Changed 6 years ago by ckeen

hm, does this differ from running sudo chicken-install setup-helper?

comment:2 Changed 6 years ago by ckeen

  • Owner set to ckeen
  • Status changed from new to accepted

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

comment:3 Changed 6 years ago by ckeen

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.

comment:4 Changed 6 years ago by ckeen

  • Owner changed from ckeen to kon
  • Status changed from accepted to assigned

Kon could you have a look at this please?

comment:5 Changed 6 years ago by kon

  • Status changed from assigned to accepted

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.

comment:6 Changed 6 years ago by kon

For something like SRFI 29 bundles install-extension is no help. Perhaps the setup-api copy-file might set the permissions.

comment:7 Changed 6 years ago by felix

  • Milestone 4.8.0 deleted

comment:8 Changed 3 years ago by retroj

  • Cc retroj added

bump. any ideas on this?

comment:9 Changed 3 years ago by kon

  • Resolution set to fixed
  • Status changed from accepted to closed

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.

Note: See TracTickets for help on using tickets.