Al Brookbanks Posted March 10, 2005 Share Posted March 10, 2005 Does anyone know how php can have permission to chmod files and folders? It always fails. What group does apache have to be in? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2005 Share Posted March 10, 2005 ah, i have done this before.. let me look for it and get back to you on this brooky Tony~! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2005 Share Posted March 10, 2005 What group does apache have to be in? nobody:norgoup on most linux box's BUT on some it can be anything take suse there it is apache:nogroup But the admin ( root ) can make it what ever he or she wish's too.. So if you are going to use the CC install script to do this good luck. Oh and a reg apache install ( Not rpm/deb/exc ) the defualt is apache:apache If you still need the PHP Command string let me know i will post it in PM or e-mail to you since it can be used to hack a system. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 11, 2005 Author Share Posted March 11, 2005 Cool thanks guys. ) CC3 writes the config to a file like these forums do...Most servers dont allow php to modify file perms... I will have to talk to my administrator. :D Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted March 11, 2005 Share Posted March 11, 2005 don't file mangaer scirpts do this in PHP (mine does) so couldnt u implement somehting like that into the installer so it would chomd it at the end of the process seemes possible and quite easy,---------------Josh Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 11, 2005 Author Share Posted March 11, 2005 No. Its to do with usernames and groups on the server to allow chmod chgrp and chown to work. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2005 Share Posted March 11, 2005 you could use ftp_chmod either on the primary account, or on an ftp account for cubecart with appropriate permissions. Quote Link to comment Share on other sites More sharing options...
Guest stijnj Posted March 11, 2005 Share Posted March 11, 2005 I came across the same prob with the filemanager mod didn't find a solution though... Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 11, 2005 Author Share Posted March 11, 2005 Yeah you need full root access to the server to modify the group settings. Quote Link to comment Share on other sites More sharing options...
Guest stijnj Posted March 11, 2005 Share Posted March 11, 2005 found this one.. As far as I can tell, PHP's built in functions will not do a recursive chown or chgrp. But it wouldn't be hard to write a function for this. Here is some starter code based on an example written by John Coggeshall which I found at http://www.coggeshall.org : <?php function recurse_chown_chgrp($path2dir, $uid, $gid){ $dir = new dir($path2dir); while(($file = $dir->read()) !== false) { if(is_dir($dir->path.$file)) { recurse_chown_chgrp($dir->path.$file, $uid, $gid); } else { chown($file, $uid); chgrp($file, $gid); } } $dir->close(); } ?> Quote Link to comment Share on other sites More sharing options...
Guest Posted May 6, 2005 Share Posted May 6, 2005 http://www.cubecart.com/site/forums/index....t=0entry37260 this may also be of use in this instance, brooky Quote Link to comment 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.