Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2011, 06:59 PM   #1
nimblebooks
Enthusiast
nimblebooks began at the beginning.
 
Posts: 28
Karma: 10
Join Date: May 2010
Device: Kindle
Here's a puzzler: --title req'd when run by root

Here's a puzzler. I have a bash script that creates ebooks by running ebook-convert from the command line, either by the user or by root as result of a web form submission. It was working fine until I removed the --title option. Now it still works fine when run by the user, but the ebook-convert command fails when run by root as the result of the web form submit. As far as I can tell, the only difference is that I removed the --title option. When I put it back with a static --title=foo, both user and root work fine.

Any ideas?
nimblebooks is offline   Reply With Quote
Old 11-24-2011, 07:20 PM   #2
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
Web servers typically don't run as root, so perhaps a file needs to be overwritten that is owned by root, or something? Can you su to the user that the web server runs as, and then try running the command from the command-line that the web form submission runs?
susan_cassidy is offline   Reply With Quote
Advert
Old 11-24-2011, 07:46 PM   #3
nimblebooks
Enthusiast
nimblebooks began at the beginning.
 
Posts: 28
Karma: 10
Join Date: May 2010
Device: Kindle
changing the permissions on the source file did the job!
nimblebooks is offline   Reply With Quote
Old 11-25-2011, 07:51 AM   #4
nimblebooks
Enthusiast
nimblebooks began at the beginning.
 
Posts: 28
Karma: 10
Join Date: May 2010
Device: Kindle
Quote:
Originally Posted by susan_cassidy View Post
Web servers typically don't run as root, so perhaps a file needs to be overwritten that is owned by root, or something? Can you su to the user that the web server runs as, and then try running the command from the command-line that the web form submission runs?
yes, you're right, it was running as Apache's user. what you suggested would have worke.d Once I wrote the post above and realized that it had to be a permissions issue, I went back to the ebook-convert command line in my script and eyeballed each component until I realized which files Apache must be having trouble accessing.
nimblebooks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'RUN, RUN, RUN' a crime thriller $1.61 tothepoint Self-Promotions by Authors and Publishers 10 09-01-2014 12:07 PM


All times are GMT -4. The time now is 05:28 AM.


MobileRead.com is a privately owned, operated and funded community.