Loading ...
Sorry, an error occurred while loading the content.

Automatic creation and permission..

Expand Messages
  • zeshanism
    open (LOGFILE, /home/database.db ) ; print LOGFILE Here goes the data n ; close (LOGFILE) ; Above given is the simple script. IF database.db is not existing
    Message 1 of 1 , Mar 28, 2003
    View Source
    • 0 Attachment
      open (LOGFILE, ">/home/database.db") ;
      print LOGFILE "Here goes the data\n";
      close (LOGFILE) ;

      Above given is the simple script. IF database.db is not existing
      script will create the file automatically. But the problem is it is
      created with the permissions of 0644. I want to create it with
      permission 0666 by the script. I tried.

      open (LOGFILE, ">/home/database.db") ;
      print LOGFILE "Here goes the data\n";
      close (LOGFILE) ;
      chmod (0666, '/home/database.db');

      But it's not working, any solution to it?

      Thanks,

      Zeshan.
    Your message has been successfully submitted and would be delivered to recipients shortly.