NamedTemporaryFile and mode a+rwx

  • Thread starter christophe.delarue
  • Start date
C

christophe.delarue

Hi,

I'd like to create a temporaty shell script. Therefore I use tempfile
with NamedTemporaryFile. The problem is that the _mkstemp_inner create
the file using 06000 code. Then the fdopen is called, but the stat of
the file does not change to executable.

Why the fdopen does not modify the mode of the file ?

Without the executable flag, this could not be understood as an
executable file.

Thanks.

the trace :
File: `/tmp/tmp5wwa9K'
Size: 0 Blocks: 0 IO Block: 8192 regular empty
file
Device: 2h/2d Inode: 8593614 Links: 1
Access: (0600/-rw-------) Uid: (10373/ numerix) Gid: ( 1102/
rms)
Access: 2005-10-03 15:30:38.000000000 +0200
Modify: 2005-10-03 15:30:38.000000000 +0200
Change: 2005-10-03 15:30:38.000000000 +0200
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top