[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Permissions on /usr/src/kernel-source-x.y.z and compiling as an ordinary user



Team:

Up to now, I've been building my kernels as root.  In fact, doing everything
as root.  Installing the source, compiling, and installing the resultant
kernel.

But this group seems to think that sound practice would be to only use root
to download/install the kernel-source (via apt-get) and install the kernel
(via dpkg -i) and do everything else as an ordinary user, via fakeroot.

That said, after apt-getting the kernel-source, what permissions do you suggest
be set on the /usr/src/kernel-source-x.y.z directory, and what group membership
do you recommend/. 

By default, /usr/src has gid src, and group permissions are rws, which I
assume means SGID . . .  but the bunzipped and untarred src package directory
is set 755 with a GID of root . . . 

What do you folks recommend?  After untarring the source:

add my ordinary user to group src
chgrp -R src /usr/src/kernel-source-x.y.z
chmod -R 775 /usr/src/kernel-source-x.y.z

and then be an ordinary user for:

fakeroot make-kpkg clean
copy /boot/config .config
make kpkg xconfig
fakeroot make-kpkg clean
fakeroot make-kpkg kernel-image

is that it?

madmac


-- 
Doug MacFarlane
madmac@covad.net



Reply to: