View Full Version : STUPID TERMINAL! need help.....
ooagentbender
Mar 4, 2003, 11:45 PM
Ok terminal is the flippin bomb, BUT I can't make my own executable scripts for the life of me because
1 I can't coppy a new file to the bin folder cause its protected and
2 because for some reason when I use set PATH=/bin2:$PATH it doesn't add it in there with the rest of them
HELP!
im sick of having to cd to the mysql folder and type in a bunch of crap to open the server and compile PHP on it.
PS I did the chmod 755 to the file I want to execute
Thanks
Doctor Q
Mar 5, 2003, 12:31 AM
1. The way you set your PATH depends on which shell you are in. Type echo $SHELL to find out for sure. If you are using the tcsh shell or the C shell then you want to type either setenv PATH /bin2:$PATH or set path=(/bin2 $path) instead of PATH=/bin2:$PATH. If you want to know why there are two methods, I can give you more details.
2. Are you really talking about a folder named /bin2, or do you mean a bin2 subfolder of a mysql folder? In either case, you need the full pathname in your PATH, e.g., /bin2 or /Users/nibbler/bin2 or /usr/local/mysql/bin2 or whatever.
3. If you can't copy your script into a folder, you have three choices: (a) become a user who has permission to do the copy; (b) change the target folder permissions so you DO have permission to do the copy; (c) put the script somewhere that you DO have access to and set your PATH to use it.
Chimaera
Mar 5, 2003, 03:50 AM
have you tried using sudo (or su if your mac has root enabled)?
if not type:
sudo cp <filename> <copy to location>
and it will prompt you for an admin pass
leprechaunG4
Mar 5, 2003, 08:28 AM
Like chimaera said, I think you need root privelage to write to the bin directory. So either sudo it or activate your roo accoutn and su
Doctor Q
Mar 5, 2003, 10:42 AM
sudo and su may get the job done, but they may also be overkill. In the case of mysql, there is usually a dedicated user name (e.g., mysql) who owns the folders and files, so becoming that user makes more sense. There is also a hidden disadvantage in using root, which is that files you create may end up owned by root and inaccessible to the regular users who need them, so you have to remember to do chowns, chgrps, or chmods. I don't think we have enough details from ooagentbendero to decide.
sparkleytone
Mar 5, 2003, 11:20 AM
edit your path declaration in the /etc/csh.login file. before you save it, make sure that it is all on one line.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.