View Full Version : chown() ?
DrkFusion
09-23-2002, 01:33 AM
How do I use the chown() function to change ownership of folder, and then a file, if someone can post the code for changing ownerships of folders and files seperatly here, I would be really greatful.
Thank you in advance
Regards
-Arunan
concept
09-23-2002, 05:07 AM
your a punk your online and you never came back to aim
punk
DrkFusion
09-23-2002, 11:30 AM
Hey Im online now!!
Im not a punk :(
DrkFusion
09-23-2002, 07:57 PM
so umm anyone know how chown works?
nsr81
09-23-2002, 08:01 PM
Your script needs to be running as "root" user, since in most setups chown() can only be run by root.
From php manual:
Only the superuser may change the owner of a file.
http://www.php.net/manual/en/function.chown.php
Hope that helps.
DrkFusion
09-23-2002, 08:05 PM
Yes, but what is the exact code, I know that the root has to be used, but what is the code that to be used
like chown(dir); or what?
nsr81
09-23-2002, 08:12 PM
chown("/path/to/the/file", "username");
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.