grandman Posted December 5, 2008 Share Posted December 5, 2008 Hello, has anyone any idea who the owner is of a folder created using mkdir. I seem to have some problem, and a friend is telling me that it's because I used mkdir to create the folder, that it will not allow me to write to it. Anyone heard of this before? If so is there away around it? DG Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/ Share on other sites More sharing options...
Mchl Posted December 5, 2008 Share Posted December 5, 2008 That would be apache user I believe Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/#findComment-706662 Share on other sites More sharing options...
lanmonkey Posted December 5, 2008 Share Posted December 5, 2008 according to the php documentation mkdir creates folders using 777 permissions by default Therefore if you have permissions to create the folder, and mkdir DOES create the folder you chould be able to write to it. have you got safe mode on? Note: When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/#findComment-706666 Share on other sites More sharing options...
grandman Posted December 5, 2008 Author Share Posted December 5, 2008 according to the php documentation mkdir creates folders using 777 permissions by default Therefore if you have permissions to create the folder, and mkdir DOES create the folder you chould be able to write to it. have you got safe mode on? Note: When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. Hello, Not running in safe mode, is there any way of finding who the owner is? DG Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/#findComment-706682 Share on other sites More sharing options...
lanmonkey Posted December 5, 2008 Share Posted December 5, 2008 use fileowner() to get the user ID you can then use posix_getpwuid() to get the user, but I think you have to install it. Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/#findComment-706684 Share on other sites More sharing options...
premiso Posted December 5, 2008 Share Posted December 5, 2008 Using your FTP client, it should tell you who the owner is. Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/#findComment-706804 Share on other sites More sharing options...
grandman Posted December 7, 2008 Author Share Posted December 7, 2008 Using your FTP client, it should tell you who the owner is. Hello, Tried My FTP Client and that tells me the owner in nobody? It did allow me to delete it though. will have to change my mkdir script, can anyone tell me were I put chowner in my script, before mkdir or after this function has been executed. DG Quote Link to comment https://forums.phpfreaks.com/topic/135641-who-owns-a-foder-created-with-mkdir/#findComment-708494 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.