Reputation: 949
I'm uploading files to the server with a PHP Script. I also have scripts to let the user delete these files. Should I chmod the file after upload to give user the rights to delete the file ?
chmod ($baseDir . $_FILES['file']['name'], 0644);
Upvotes: 1
Views: 62
Reputation: 4494
As a general rule, no. If the uploading script and the deleting script run as the same system user, it already has the permissions to delete it.
Just try uploading a file, and then delete it?
Upvotes: 2