|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
System commands not executing
Hello all,
I have inherited a Perl script that executes several system commands: Code:
mkdir /tmp/n3Z7 chmod 777 /tmp/n3Z7 hmmsearch --cut_tc /AMP-binding.hmm /outfiles/OUT_afumigatus.input > /tmp/n3Z7/hmm_AMP.out hmmsearch --cut_tc /Acyl_transf_1.hmm /outfiles/OUT_afumigatus.input > /tmp/n3Z7/hmm_Acyl_transf.out hmmsearch --cut_tc /Condensation.hmm /outfiles/OUT_afumigatus.input > /tmp/n3Z7/hmm_Condensation.out rm -rf /tmp/n3Z7 For some reason, the hmmsearch functions are no longer being executed but the mkdir and chmod commands work correctly. Could it be that the daemon user (which is executing these commands) does not have sufficient privileges to execute the hmmsearch command? |
|
#2
|
|||
|
|||
|
Yes, it could be. Or something else wrong with hmmsearch - have you tried running the commands yourself or looking in the error logs?
|
|
#3
|
|||
|
|||
|
Quote:
Sorry, I should have added that executing the commands through a command prompt works fine. |
|
#4
|
||||
|
||||
|
There's no Perl in what you've posted. What OS are you on - I can move this to Linux/Unix help as appropriate.
__________________
~ishnid; Have you tried: [ search.cpan.org | perldoc | Java API | mysql.com | google ] Apostrophes are NOT used for possessive pronouns or for noun plurals, including acronyms. |
|
#5
|
||||
|
||||
|
can you log in as the daemon user and see what happens when you run them on the command line?
Did the logs show up anything?
__________________
--Ax without exception, there is no rule ... The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones ![]() 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Zawinski |
|
#6
|
|||
|
|||
|
Well, his perl script is using "system()" to call those commands.
Seems like a permissions problem then - can you try changing owner or permissions on hmmsearch to see if that works? |
|
#7
|
||||
|
||||
|
it'd be best to find out what the actual issue is before changing permissions, hence asking him to logon as the daemon user to see what feedback the OS gives him on the issue, or if it's possible to pipe the STDOUT and STDERR for the cron job to a text file and see if that yields any further information ... or using backticks or the qx operator to run the shell commands
Last edited by Axweildr : May 6th, 2008 at 06:42 PM. |
|
#8
|
|||
|
|||
|
I have confirmed that it is a permissions issue. Thanks for all your input.
|
|
#9
|
||||
|
||||
|
can you be more specific, had the user profile changed, or did somebody 'do nothing', the old "It weren't me..." defense ...
|
|
#10
|
|||
|
|||
|
I executed the commands in PHP which gave a return code of 127 which I assumed meant insufficient permissions. However, upon further investigation the problem was that the web browser did not know the correct path to the hmmsearch function. Thus, changing hmmsearch to /usr/local/bin/hmmsearch resolved this issue.
In other words, it had absolutely nothing to do with Perl :-) |
|
#11
|
||||
|
||||
|
the browser?? I think you meant the server, there was probably a chdir or cd command above the hmmsearch calls that was obliterated, or the search path used to contain the path to the directory that contains hmmsearch.
Whether is the shell or perl, it still needs to know where stuff is to execute it |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > System commands not executing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|