Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76530 - Undesired catalyst behavior when one tries to build a livecd-stage2 and system umask is not 022
Summary: Undesired catalyst behavior when one tries to build a livecd-stage2 and syste...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Catalyst Developers
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard: InCVS
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-03 09:31 UTC by Rodrigo Ceron
Modified: 2005-01-14 11:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
changes directory creation mode to 0755 (livecd-stage2-umask.diff,837 bytes, patch)
2005-01-03 16:57 UTC, John Davis (zhen) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Ceron 2005-01-03 09:31:11 UTC
If one has defined its system umask to something that doesn't give r-x permissions to "others", catalyst will create its temporary livecd-stage2 root directory with something other than "rwxr-xr-x" and the resulting iso image will be created without the proper permissions to allow a normal user to run programs on the CD.

Reproducible: Always
Steps to Reproduce:
1. Change system umask to 027 (to take out r-x permission to "others" when creating new files)
2. Emerge and config catalyst according to the manual in http://www.gentoo.org/proj/en/releng/catalyst/reference.xml
3. Build a livecd-stage1 with catalyst
4. Build a livecd-stage2 with catalyst 
5. chroot to the livecd-stage2 directory created by catalyst, it's in /var/tmp/catalyst/tmp/default/ if the default path was used (mount its /proc first)
6. Inside the chrooted environment, create a new user with adduser
7. Try to su to this user ("su your_user" or "su - your_user")

Actual Results:  
An error says that it was impossible to cd to the user directory

Expected Results:  
One should have become the given user after doing the su 

The errors reported in the "result" section happen because of the lack of proper
permissions to others due to the umask. The catalyst scripts should create the
livecd's directories independently of which umask the system uses. So, the
script should chmod it to the proper permissions.
Comment 1 John Davis (zhen) (RETIRED) gentoo-dev 2005-01-03 16:57:18 UTC
Created attachment 47537 [details, diff]
changes directory creation mode to 0755

All created directories should be force created as 0755 with this patch. Let me
know how this works out.
Comment 2 Rodrigo Ceron 2005-01-04 08:50:45 UTC
The patch has been tested on an x86 machine. The livecd stages were deleted, umask was set to 027 and the stages were built again. The livecd-stage2 was created with the correct permissions and the results are what they should be.

The patch worked out very well.
Comment 3 John Davis (zhen) (RETIRED) gentoo-dev 2005-01-04 13:08:15 UTC
excellent! the fixes are in CVS.

I also tidied up generic_stage_target.py so that we don't run into this with stages as well.
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2005-01-14 11:49:49 UTC
Catalyst 1.1.2 is now out!