LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 10-04-2006, 02:38 AM   #1
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Rep: Reputation: 30
php and bash script permissions


What sort of permissions would I need to get php to run a shell script? I have tried giving everybody execute permissions but I'm still getting an access denied message in my apache log.

Does apache need to own the directory /home/paddy/scripts?

Anyone any idea?

Code:
<?php
echo passthru('/home/paddy/scripts/upload.sh  `find /tmp/upload/*`');
?>

Edit:

PHP 5
Fedora Core 5
 
Old 10-04-2006, 11:12 AM   #2
demon_vox
Member
 
Registered: May 2006
Location: Argentina
Distribution: SuSE 10
Posts: 173

Rep: Reputation: 30
Hi,
I think that the webserver shouldnt be able to read from your home directory (except from the public_html). So the permission would go wrong from your directory permission upwards (and not just the file permission). I would just move the script to the public_html directorio to see if it works, or to some other directory where the webserver can read and execute.

Hope this is useful.
Cheers!
 
Old 10-04-2006, 07:01 PM   #3
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
Moving the scripts into /var/www/html/scripts worked perfectly.

Thanks,
Paddy
 
  


Reply


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
LXer: Title: PHP/MySQL Classifieds Script AddAsset1.php Script Insertion LXer Syndicated Linux News 0 07-02-2006 07:21 PM
Cannot create folders with bash script called from php keyF Linux - Software 4 06-25-2006 11:58 AM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 12:51 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 01:20 AM
bash script prob: how can i tell the script that a 'dd' has finished? Frustin Linux - General 2 04-02-2003 06:34 AM


All times are GMT -5. The time now is 11:42 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration