python - os.chroot Operation not permitted -
i'm trying write python script generate debian package. i'm generating required folder structure in temporary folder. in order change uid , gid of /usr , subfolders root thought of using chroot.
however, on line
os.chroot(tmpdir)
i get:
oserror: [errno 1] operation not permitted: '/tmp/tmpvntqw7/myproj'
i've tried mini-tutorial same results: http://www.tutorialspoint.com/python/os_chroot.htm
why be? thanks
chroot() can done root.
do 1 of these:
run script sudo
make script setuid root, , setuid(geteuid()) equivalent python magic
Comments
Post a Comment