LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2004, 11:35 PM   #1
durden2.0
Member
 
Registered: May 2003
Distribution: redhat 9.0
Posts: 113

Rep: Reputation: 15
good permissions for /usr/src


I was wondering what is a good permission set to put on the /usr/src directory? I can't do anything inside that directory now unless I am root. However, I want to be able to compile the kernel and when I do make menuconfig I don't have the permissions for it. Are there any suggestions for this problem?
 
Old 03-19-2004, 03:18 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
its just a general directory, so i wouldn't be overly scared to set high permissions

like
777

that way everyone can use that directory, but id probably suggest maybe setting tighter permissions on certain files/folders in that directory that are important
 
Old 03-19-2004, 03:26 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
When dealing with permissions, my "motto" per se is:
Use as strict a set of permissions as you can to perform your desired function.

So, I personally wouldn't set a 777 on just about anything on my system. Instead, in the case of kernel compiling in /usr/src I'd instead create me a "compile" or "kernel" group:
groupadd kernel
And then add my user to this group:
usermod -G kernel masterc
And then chown the directory to that group:
chown -R root.kernel /usr/src
And finally, ensure the chmod matched that for proper execution:
chmod 750 /usr/src
And then from that point on, whatever users I wanted to allow to compile a kernel I'd simply have to add them to the kernel group.

It may seem extensive and some may consider it a bit of overkill, especially for something in /usr/src however it's what I would consider the "proper" way as permissions are certainly something linux excels in that other OS don't.

Cool
 
Old 03-19-2004, 04:00 AM   #4
durden2.0
Member
 
Registered: May 2003
Distribution: redhat 9.0
Posts: 113

Original Poster
Rep: Reputation: 15
Good suggestions guys, as always thanks for the help! I have went ahead and done as you suggested, creating a kernel compiling group. I actually already did that just wasn't sure about how to use the chown in the correct way.
 
Old 03-19-2004, 05:55 AM   #5
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Kernel compile

Well, I have to agree with setting conservative permissions. Setting a system directory to 777 can be dangerous and should best be avoided. Also, Linus recommends strongly against compiling a kernel in /usr/src. I always compile a kernel in my /home directory, that way permissions are not an issue at all except to do make menu_config, and installing the actual kernel. There are other reasons for not compiling a kernel in /usr/src, but they don't come to mind at the moment. Check out www.kernel.org, or http://kerneltrap.org/ for more info.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/src SeattleSux Linux - Newbie 3 12-23-2004 10:29 PM
/usr/src/??? iain.ross Linux - Software 5 08-24-2004 02:18 PM
/usr/src ??? gibbylinks Red Hat 1 10-24-2003 03:05 AM
how to fill-in : /usr/src shankariyer Linux - Software 2 03-05-2003 01:25 AM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration