coopster

msg:1270923 | 2:26 pm on Jan 5, 2006 (gmt 0) |
Why would you want to change the owner/group to the FTP user? Why not keep it as the user that uploaded the file?
|
BlackDex

msg:1270924 | 10:16 pm on Jan 5, 2006 (gmt 0) |
Um.... That is what i mend :p I think i just fraised it wrong.. I Want the owner of the file to be the owner when it gets executed. And that isn't the way it is now.
|
LeChuck

msg:1270925 | 10:24 pm on Jan 5, 2006 (gmt 0) |
exec("chown newowner /path/to/the/file.jpg");
|
henry0

msg:1270926 | 12:18 am on Jan 6, 2006 (gmt 0) |
If you do not run your own server check with your ISP Quite a few ISPs won't allow you to change ownership
|
BlackDex

msg:1270927 | 9:28 am on Jan 6, 2006 (gmt 0) |
Well... chown doesn't work... Only root can change owners (atleast on our server). But owners can change groups. Anway.. The only solution i can find is to use suExec or something like that. But that means i have to use CGI, and then the perferonase goes down. Is there an other solution for this problem? Thx in advanced.
|
coopster

msg:1270928 | 4:16 pm on Jan 6, 2006 (gmt 0) |
But owners can change groups. |
| Then how about chgrp [php.net]?
|
BlackDex

msg:1270929 | 5:36 pm on Jan 6, 2006 (gmt 0) |
chgrp is fine, if you want to let the group have write access. But on a server with multiple hosts this just isn't secure. i Mabye have found a create tool that works just like suExec for CGI scripts. Thisone is called suPHP [suphp.org], this together with Safe_Mode should do the trick of what i want :). It will start the script using the owner/group of the script, and therefor every file created by that script will be of the same owner/group. I haven't tryed it yet, but i have seen some good posts about it.
|
|