file permissions

  • smiledrops
  • Student
  • Student
  • User avatar
  • Joined: Jul 07, 2005
  • Posts: 66
  • Loc: pakistan
  • Status: Offline

Post December 4th, 2008, 11:47 pm

i have a strange problem that whenever i upload a file to server in a directory, and change it's permission either 664 or 777, its ok good....

but when i upload a file through PHP SCRIPT and then change it's permission through CHMOD(); it did't change the file permission and even more when i manually change that file ( uploaded by php script ), then it also denied that server have no permission or file is exists or not................
( can't allow to change the file permission uploaded by php script )

can any body tell me the reason of this, and how can i solve this......
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 4th, 2008, 11:47 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post December 5th, 2008, 12:11 am

Are you doing
Code: [ Select ]
chmod($file, 664);


or are you doing
Code: [ Select ]
chmod($file, 0664);


The last one is correct.
http://www.php.net/manual/function.chmod.php
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 107 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.