Have you tried using a (temporary) umask override?

import os
import shutil

m = os.umask(0)
shutil.move(src, dst)
os.umask(m)

-Nathan



From: Fredrik Averpil 
Sent: Monday, November 21, 2011 10:54 AM
To: Nuke Python discussion 
Subject: [Nuke-python] Modifying files from within Nuke: permissions

Hello again :) 

I've created a script that switches out the render path to a local path, 
performs the render, and then attempts to move the render to the server.

However, Python inside of Nuke is not allowed to do anything like that, it 
seems, and runs into permissions problems. Any ideas on how I can make this 
work?
Any ideas are very much appreciated.

The user account running Nuke can freely create, modify and delete files and 
folders both locally and on the server. Perhaps I could specify a username and 
a password inside the script?
I'm using shutil.move(src, dst) when attempting to move the files. 


// F



--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to