...

View Full Version : CHMOD'ing a file when uploading it?



ShootingBlanks
05-12-2008, 03:29 PM
Hello.

I created a standard form for people to upload files to my web server from. The problem is that when the files get uploaded, they are not readable. The FOLDER on the server is CHMOD'd to "744", but the FILES get uploaded as "600" (not readable)...

I would like to know how to get a file uploaded as "744" when using the standard "move_uploaded_file" command?...

Thanks!!!

firepages
05-12-2008, 03:33 PM
if apache/php created the files then it can change their permissions ...


<?php chmod($filename, 0744);?>

ShootingBlanks
05-12-2008, 03:50 PM
if apache/php created the files then it can change their permissions ...


<?php chmod($filename, 0744);?>


I used the "chmod" function, and if I log into my FTP server, I can see that the permissions on the file are now what I want them to be. However, the file still isn't readable for whatever reason!...

Any ideas??? :confused:

ShootingBlanks
05-12-2008, 04:08 PM
EDIT: - NEVERMIND!!!

I needed to have the folder that the files were going into set to have "Execute" permissions. Thanks!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum