LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-15-2008, 10:39 AM   #1
tospo
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Rep: Reputation: 0
using batch queue from Apache as user nobody


Hi,

I am on CentOS 5, running Apache2. My website contains a page where users can submit a job that could take some time to run, so I want to submit the job to the batch queue to run it when system load is low and email the user the results when it is done.
The website is done in Perl CGI, and I submit the job with a system call like this:

Code:
system(" echo \"$cmd\" | batch 1>/abs/path/to/tmp_dir/batch_outfile.txt 2>&1 ")
It didn't work with the command I really need to run, so I tried it with a very simple command, i.e.
Code:
$cmd = "echo 'test' > /abs/path/to/tmp_dir/test.txt"
When the webserver submits this command, it seems to get added to the batch queue, because the file I redirect STDERR and STDOUT to from batch looks like this:
Code:
job 25 at 2008-02-15 16:35
However, the result file "test.txt" doesn't appear and when I run
Code:
atq
as super-user I don't see the submitted job, so it is not pending either.

Running the same batch submission command
Code:
echo "echo 'test' > /abs/path/to/tmp_dir/test.txt" | batch
under my own account or the super-user works without problems.

I don't have a file /etc/at.allow and my /etc/at.deny is empty, so the apache-server (running as user "nobody") should be able to access the batch queue.

User "nobody" has permissions to write to the target directory (it writes some other temp files to that directory and there are no problems with that either).

I'm running out of ideas and would appreciate your help. Thanks a lot!
 
  


Reply

Tags
apache, at, nobody


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Looking to Create User Accounts Using Batch Load Script wlue Linux - Newbie 3 12-17-2007 01:51 PM
how can i queue directory on apache doronunu Linux - Software 4 08-06-2006 05:30 PM
qmail +qmail-qfilter + qmail-scanner-queue+qmail-user-masq.pl problem countcobolt Linux - Networking 0 07-08-2004 11:29 AM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
Deleted qmail queue /var/qmail/queue tris Linux - Software 0 10-24-2003 11:52 PM


All times are GMT -5. The time now is 04:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration