LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-16-2012, 10:33 PM   #1
aashish_delhi
LQ Newbie
 
Registered: Aug 2012
Location: India
Distribution: Ubuntu 11.10
Posts: 12

Rep: Reputation: Disabled
Build script cannot write to /usr/local/bin


Hi All,
I am new to LQ and this is my first question.

I am running a build script on my Ubuntu 11.10 system that tries to write into /usr/local/bin, but permission is denied to it. I understand that I can simply run the script as sudo to get around it, but the build must be done as a normal user. I am afraid I cannot post the script here, but I'd appreciate if you could point me in the right direction.
Actually, the build will create a ramdisk and the script is supposed to write into /usr/local/bin of the ramdisk. But for some environment issue it tries to write into the system's path instead. I am not sure what is happening here.
Any suggestions/pointers are much appreciated. I'd be happy to provide as much additional info as I can without actually posting the build scripts (this is a problem I have at work, so...).

Thanks for your time!
-Aashish.
 
Old 08-17-2012, 12:12 AM   #2
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
If you want a non-root program to write in /usr/local/bin, you need to give permission, probably temporarily. Ways to do that include adding the user to a special group and giving that group permission, or adding the user to the disk group (or whatever has the permission), or making the user be the temporary owner of /usr/local/bin, or changing the permissions to allow any user to write there. Then remember to change things back, otherwise. Apparmor may be another way to approach this.
 
Old 08-17-2012, 01:07 AM   #3
aashish_delhi
LQ Newbie
 
Registered: Aug 2012
Location: India
Distribution: Ubuntu 11.10
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for the quick reply, Skaperen!
I was thinking more on the lines of some environment variable telling the script that the root path is to a different directory... Is that a possibility? I ask because it appears to be an environment issue: works for some colleagues and does not for some others, and we have not been able to figure out any difference in the environment setup yet.
Any ideas in that direction?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between /usr/local/bin & /usr/bin cgirishaanekal Linux - Newbie 2 07-19-2012 02:18 AM
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 02:59 PM
[SOLVED] Kickoff Application Launches from /usr/bin rather than /usr/local/bin Tim Johnson Slackware 2 05-26-2010 09:36 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:16 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