By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,651 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,651 IT Pros & Developers. It's quick & easy.

chown() problems

P: 9
I just made a simple program to create files; I'm trying to get the hang of basic file manipulations.
Whatever file my program makes, the owner of the file is "www-data," so I can't edit it using my regular server user. I can use root to change the ownership to the server user, but I don't want to do that for every file.
That's why I tried to use chown() to give ownership to the server as soon as the file is made, but I get this error:

"Warning: chown() [function.chown]: Operation not permitted in /home/server/mysite/make.php on line 17"

chown(), chmod(), and chgrp() all apparently need root permissions.
So how do I give PHP the permissions required to use these functions??
Jan 8 '08 #1
Share this Question
Share on Google+
2 Replies


P: 9
ideas anyone?
I still can't seem to get it to work...
Jan 8 '08 #2

rpnew
100+
P: 188
ideas anyone?
I still can't seem to get it to work...
Hi,
You can go through this link... this may help you.....
click here

Regards,
RP
Jan 9 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.