Home : General : Perl Programming :

General: Perl Programming: easy chmod: Edit Log

Here is the list of edits for this post
easy chmod
Code:

# Build a .html file for indexing.
open (FILE, ">$build_root_path/deeplink.html") or &cgierr ("Reason: $!");
print FILE "# TL Int. # \n\n\n";
print FILE $html;
close FILE;



Currently I use the above code to build a html-file (deeplink.html), only now I need to set the permission of the file on 777. This so I can rebuild my database from telnet AND online. Why? Because my new provider doesn't support the feature that I have the same userrights on my cgi-bin - forgot the name ;-)


To do this I put the follwoing sub just after the first one, but I have no clue what it means. (the 'if' part)

It works, but shouldn't there me a easier and neater way?

Code:
if (chmod ($build_db_per, "$build_root_path/deeplink.html")) {;
# BUGFIX: Avoid permission problems.
}


But more important:

Is it dangerous to have all html-files set with permission 777. What can happen?

Last edited by:

cK: May 27, 2002, 3:35 AM

Edit Log: