http://qs321.pair.com?node_id=941311


in reply to Re: Problem in creating Directory
in thread problem in mkdir

after adding $! , am getting the following error in my gi

Software error: Cannot make directory /var/www/html/piRNA_html/UNAFold/output/10010 , errorwas:Permission denied at /var/www/html/piRNA_html/UNAFold/mkdirtest.cgi line 39.

i couldnt understand , though 0777 permission given , y its giving error about permission, please reply me in this

Replies are listed 'Best First'.
Re^3: Problem in creating Directory
by lune (Pilgrim) on Dec 02, 2011 at 14:05 UTC

    When you create a file or directory, you can define the permissions for the item you are going to create. These are the 0777 permissions given by You.

    As creating a new directory is nothing else but writing an entry into the directory above, you need write permissions for /var/www/html/piRNA_html/UNAFold/output.

    The user that needs those permissions is the cgi user, the script will run under.

    Here You can find some hints on CGI programming

Re^3: Problem in creating Directory
by choroba (Cardinal) on Dec 02, 2011 at 13:27 UTC
    The error tells you "You do not have the permission to create the directory", while the permission you give means "after creating the directory, give it this permission". These two permissions are totally unrelated.
Re^3: Problem in creating Directory
by runrig (Abbot) on Dec 02, 2011 at 16:41 UTC
    You've reported at least two completely different errors in this thread, "file exists", and "permission denied". For "permission denied", do this:
    ls -ld /var/www/html/piRNA_html/UNAFold/output

    What are the permissions on the directory? Do you (or the user this script is running under) have write permission in the directory?