carlg Posted December 16, 2007 Share Posted December 16, 2007 I am using php with apache. I have an application where the user uploads files. When the files land on my linux server, they are owned by apache who is the username that actually runs the apache server. What if I want the files to be owned by a different user? Is there a way? I use move_uploaded_file to rename the file once it lands. I know that php has a chown function, but you must be root to use it. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/81938-changing-owner-of-uploaded-files/ Share on other sites More sharing options...
steviewdr Posted December 17, 2007 Share Posted December 17, 2007 You cant change the owner of files you upload with apache (unless by some chance you use suphp). The best you can do is to "chmod 777" your uploaded files so you can rename or delete them afterwards. -steve Quote Link to comment https://forums.phpfreaks.com/topic/81938-changing-owner-of-uploaded-files/#findComment-417103 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.