Forum Moderators: coopster & phranque

Message Too Old, No Replies

chmod file

How to chmod file?

         

jimijoe

7:43 am on May 24, 2004 (gmt 0)

10+ Year Member



Hi,

I try to chmod file:

open(FILE, ">root_dir/file.html");
chmod (root_dir/file.html, 0777);

But it doesn't work!
How can I fix the problem?

Thanks,
Jimijeo

VectorJ

2:50 pm on May 24, 2004 (gmt 0)

10+ Year Member



The first arg to chmod should be the mode, then the filename. Enclose the filename in quotes also:

chmod (0777, 'root_dir/file.html');