CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [Solved] Problem with file attributes: 1341 instead of 1777

Print topic Send  topic

Author Message
Markie


Posts: 251
Posted: 01/05/2009, 11:01 AM

I seem to have a problem while creating upload folders. I use this code:

define ("DIRECTORY", "$folder");
do {
$dir = DIRECTORY;
while (!is_dir($dir)) {
$basedir = dirname($dir);
if ($basedir == '/' || is_dir($basedir))
mkdir($dir,1777);
else
$dir=$basedir;
}
} while ($dir != DIRECTORY);
mkdir("uploaded/$folder",1777);
mkdir("username/$folder",1777);

The directories are created without problems, but instead of file attributes 1777 the directories get file attributes 1341 and errors occur when uploading files (permission denied etc.)

What do I do wrong ?
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
jjrjr1


Posts: 942
Posted: 01/05/2009, 11:23 AM

Hi Markie

Try losing the leading 1

Try as the mode 0777 instead.

Don't know of you can set the sticky bit from php.

let me know

John

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
Markie


Posts: 251
Posted: 01/05/2009, 1:30 PM

Hi John, yep 0777 is the solution !
thanks again
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.