Tuesday, 15 July 2014

django - Permission denied: .htaccess (Python) -



django - Permission denied: .htaccess (Python) -

first created new grouping tcpdumpers, added current user group, , edited /etc/sudoers according top reply of link: running commands within python need root access

import os os.system("% sudo tcpdump") os.system("cd /var/www/tbg/media/uploads/") os.system("mkdir " + str(request.user.id)) os.system("cat .htaccess") os.system("chown www-data:www-data .htaccess") myfile = open(".htaccess", "a")

this yields error permission denied: .htaccess

this apache within django, request.user.id user object id in django.

i used touch command instead of cat yielded identical results. seems python has no rights @ no matter do.

edit: i'd point out no directory created either mkdir command. problem starts there, not .htaccess. doesn't exist.

python django apache .htaccess permissions

No comments:

Post a Comment