You are not logged in.
Hey Guys,
I apologize if this has been discussed before, I couldn't find another similar discussion in the forum.
Having followed from another discussion I had on arch before, I finally switched from being root to a regular user. However, there is this one little problem that I have now.
Earlier I used to stick my custom scripts in /usr/bin using symlinks. However, now, I clearly can not call these scripts from /usr/bin being a regular user. I have presently solved this problem by adding a "$HOME"/scripts folder to the path and calling my scripts from there. Everything has been tweaked to work again.
But I'd like to know if there is a robust solution to this problem. Where should one, say a sysadmin, keep custom scripts if he'd like users to be able to use them? And what should be safe permissions on these scripts?
Thanks for all suggestions.
Last edited by Dumbledore (2011-09-26 16:28:31)
GNU/Linux: Keep your options "open".
Offline
However, now, I clearly can not call these scripts from /usr/bin being a regular user.
If you still have your scripts in /usr/bin, post the output of
ls -l /usr/binas it shouldn't be a problem - users can use most of /usr/bin binaries w/o a problem and it has a bunch of symlinks by default.
Offline
Umm.. Err.. I feel like a nitwit right now! I can swear that I had tested putting my scripts in /usr/bin earlier and calling the scripts had resulted in Permission Errors even though I had checked for _execute_ permissions then.
So I had removed those scripts from there. Now, since you asked for output, I tried putting a few scripts there again and funnily they are working now!!! Anyhoo, be that as it may, I'll check all of them and get back to this post if I find any other problem.
Meanwhile, I'm sure that Unix has a design philosophy which divides these directories with specific intentions. So, is /usr/bin a good place to keep one's custom scripts in principle?
GNU/Linux: Keep your options "open".
Offline
Offline
/usr/bin should be maintained by the package manager. I keep a separate $HOME/bin in my PATH above all other bin's which contains my own scripts.
This.
Then there's /usr/local/bin
Offline
/usr/bin should be maintained by the package manager. I keep a separate $HOME/bin in my PATH above all other bin's which contains my own scripts.
Plus, it makes it easy to back your scripts up - just add a cronjob that rsyncs ~/bin to <somewhere_safe>. You can always reinstall the regular packages.
Offline
I started keeping local scripts in ~/.local/bin, compiled aur packages in ~/.local/var/cache/pacman/pkg, and various projects/git repos in ~/.local/src. I like the clean $HOME :-) If I had a multi user machine, any universally available scripts would be symlinked into /usr/local/bin
Scott
Last edited by firecat53 (2011-09-26 15:23:29)
Offline
Hmm.. thanks guys. Then it seems like I've been doing something right without even knowing it. ![]()
I've kept everything in "$HOME"/scripts and added it as first in my path. This is convenient because I'm the only using my laptop. Thanks for your replies. If I ever get to administering a multi user setup (quite unlikely, since I'm only a graduate student and don't let anyone touch my machine!) I'd remember /usr/local/bin.
Thanks! Marking as solved. ![]()
GNU/Linux: Keep your options "open".
Offline