Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th July 2008, 02:47
biobrew biobrew is offline
Member
 
Join Date: Jun 2008
Posts: 34
Thanks: 5
Thanked 2 Times in 2 Posts
Default Permissions question

I have a client who has a website on my debian etch with ispconfig server, this client has shell access and admin access.

He has a script that makes some shell calls, all of shell calls work except for one that reads a .doc file and converts into .txt file using the linux command line tool antiword

I installed antiword for him in /var/www/web1/web/bin/antiword and gave that directory and antiword www-data ownership and write and execute permissions

the files are read and written to in /var/www/web1/web/uploads

when I do:

su www-data

and run antiword from the command line it will read the .doc file and convert it into a text file just fine, e.g.

/path/to/antiword /path/to/docfile > /path/to/txtfile

And that works just fine

But using from php:

system("/path/to/antiword /path/to/docfile /path/to/txtfile");

Will in fact output a text file, but it will be 0 bytes in length.

Does that make any sense at all?
Reply With Quote
Sponsored Links
  #2  
Old 11th July 2008, 03:04
biobrew biobrew is offline
Member
 
Join Date: Jun 2008
Posts: 34
Thanks: 5
Thanked 2 Times in 2 Posts
Default

Another thing that I just realized that is a little weird, i'm trying to run pdftohtml from php and I get a strange error message.

but when I su www-data and run it, it works just fine. I'm not really sure how to make it so my client can run programs from the command line that read and write files to his directories.
Reply With Quote
  #3  
Old 11th July 2008, 04:27
biobrew biobrew is offline
Member
 
Join Date: Jun 2008
Posts: 34
Thanks: 5
Thanked 2 Times in 2 Posts
Default

1 more thing, this used to work before I moved the site to ispconfig, so I'm pretty sure it's a permissions problem and not a problem with the script.
Reply With Quote
  #4  
Old 11th July 2008, 08:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,001
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

Do you use suphp or do you have php safemode enabled?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 11th July 2008, 13:18
biobrew biobrew is offline
Member
 
Join Date: Jun 2008
Posts: 34
Thanks: 5
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
Do you use suphp or do you have php safemode enabled?
nope && nope

Should I?
Reply With Quote
  #6  
Old 12th July 2008, 12:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Shouldn't it read
Code:
system("/path/to/antiword /path/to/docfile > /path/to/txtfile");
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 12th July 2008, 13:05
biobrew biobrew is offline
Member
 
Join Date: Jun 2008
Posts: 34
Thanks: 5
Thanked 2 Times in 2 Posts
 
Default

It does, sorry for my typo. I should say that the code all worked perfectly before moving to ispconfig.

I kind of figure it out though. I moved antiword and the other linux command line tools needed to be called from php into a directory off of the webroot for that user, and chowned those 3rd party programs as www-data and gave www-data chmod u+x permissions and now it seems to work. It's still a little wonky but I can work around it now.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
suPHP, Joomla! 1.5, file & diretory permissions pjdevries Installation/Configuration 17 19th June 2008 03:58
Samba Permission Question phatdawg Server Operation 1 29th January 2008 20:59
question of permissions and proprietors albertux Installation/Configuration 15 22nd October 2007 20:22
Logcheck Permissions Problems Drek Server Operation 1 7th September 2007 16:43
Quick permissions question. badgerbox76 Server Operation 4 22nd July 2007 18:57


All times are GMT +2. The time now is 22:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.