I would like to runs a typesetting tool which generates a TEI xml from a word doc , after a file is uploaded to web2py. I have the ubuntu script configuration from web2py with the user www-data running the web2py framework. I have given the typesetting script the www-data rights , but it cannot set the rights. Does somebody have any idea, how I can give the rights?
Thanks for anybody for any idea? import os import shutil import subprocess def metypeset_conversion(filename): app_path = '/home/www-data/web2py/applications/HEIDIEditor/' metypeset_path = app_path+'static/meTypeset/bin/meTypeset.py' file_type = 'docx' file_path =app_path+ 'uploads/'+filename output_path = app_path +'uploads/'+ filename.rsplit('.', 1)[0] if not os.path.exists(output_path): os.makedirs(output_path) cmd = [metypeset_path , file_type +' '+file_path+' '+output_path] try: #os.setuid(1000) #os.setgid(1000) retcode = subprocess.call(cmd) except OSError as e: retcode = [cmd, e] return dict(retcode=retcode) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.