Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Mkdir

Status
Not open for further replies.

eduvzla

Programmer
Mar 13, 2002
2
VE
I have a problem with Mkdir, but I don't know if the problem is my fault or the problem is the hosting.

Why?.
I create my directory with this sentence:
mkdir ("/path/nameX", 0777);
And the directory create successful, I put 777 because I need to save some files in there, and I need open some files too. I try to configure with 666 but I had had a problem when i tried to create the files. But, it doesn't matter because 777 work good.
But, I have OTHER problem, I use cuteFtp software for see my site, and 777 in cuteftp mean WRITE/READ/AND EXECUTE, if i configue the directory for cuteftp with 777 perfect, it show me all the permission good, but when I create the directory with the sentence, and 777, when I see the directory by cuteftp doesn't show me all permission, for example I can't erase, and it's too bad, becuase I need erase the directory, well a page erase the directory, but, by cuteftp I CAN'T ERASE, it show me a message told me that i don't have permission. WHY?. WHY, when i use this sentence:
mkdir ("/path/nameX", 0777); the directory is protect?. I can't erase anyway. neither cuteftp can erase the directory WHY?.
The problem is the 777, i don't know a lot about permission unix, because i'm window programmer, but i need to make this page on PHP.

Thanks.
Atte.
Eduardo
 
PHP doesn't allow you to make a directory with 777 permissions, to get
around this make the directory, then change its mode to 777.
Code:
<form method=&quot;post&quot;
action=&quot;directory_make_upate.php&quot;>
Create Directory:<input type=&quot;text&quot; name=&quot;file&quot;
size=15>
<input type=&quot;submit&quot; value=&quot;Create&quot;>
</form>

(directory_make_update.php :)
<?
mkdir($file,0755);
chmod ($file,0777);
?>
See also for more info
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top