valtido Posted April 19, 2007 Share Posted April 19, 2007 hi im creating php registration form where i need the users to register and create a directory and a file files for it. So far im good, but when i try to delete the files i get an error because the username onership is changed to "nobody.nobody" instead of my admin "username.username". is there a way to preset ownership of the file and directory b4 creating them or while creating them? some one help please becoz i have been researching for days for this and i can't find anything about it. by the way im using mkdir() and open file function. Link to comment https://forums.phpfreaks.com/topic/47712-change-owership-name/ Share on other sites More sharing options...
monk.e.boy Posted April 19, 2007 Share Posted April 19, 2007 When you create the dir it will be owned by apache.apache. You can get apache to chown and chmod the directory + files. You may need to add apache to a group with more permissions, depending on where your directory is and who owns the parent directories. The simplest way would be to log in as root, chown /var/www/html as apache.apache and create the user directory in this place. monk.e.boy Link to comment https://forums.phpfreaks.com/topic/47712-change-owership-name/#findComment-233101 Share on other sites More sharing options...
valtido Posted April 28, 2007 Author Share Posted April 28, 2007 the thing is that i have a hosting company to do that for me and i dont have access to appache they have told me that the owner is nobody.nobody ... and also i cannt chage it unless i ask the to do so ... if u know what i mean:( I thought there could be a simplier way on that one but i guess not thnks anyways:D Link to comment https://forums.phpfreaks.com/topic/47712-change-owership-name/#findComment-240716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.