+ Reply to Thread
Results 1 to 2 of 2

Thread: Check if a directory allows programs to create files

  1. #1
    mike
    Guest

    Check if a directory allows programs to create files

    how to Check if a directory allows programs to create files.?
    Last edited by mike; 11-12-2012 at 02:53 AM.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    13
    When you need to know whether or not a directory allows CGI programs to create files, to prepare an error message if disallowed, for example, I use the following snippet :
    Code:
    my $filename = 'check.txt';
    if(open F,">$filename")
    {
       close F;
       unlink "$filename"';
       print 'Permissions are OK.';
    }
    else
    { print 'Permission denied for writing files!' }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts