Re: Permissions for mkdirs
| From: | Bastien Koert | Date: | Sat, 28 Oct 2006 22:10:50 +0000 |
| Subject: | Re: Permissions for mkdirs | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42618@lists.php.net to get a copy of this message | ||
chmod will work for both folders and files...
bastien
From: "Andrew Darby" <adarby@gmail.com> To: "Bastien Koert" <bastien_k@hotmail.com> CC: php-db@lists.php.net Subject: Re: [PHP-DB] Permissions for mkdirs Date: Sat, 28 Oct 2006 18:06:36 -0400 Unfortunately, I can't get in to the conents of the folder to change the permissions! More generally, I'm wondering if there's a better/best practice way of doing this. Or changing the ownership of the file to me--but I'm not sure who is me, and who this file is being created as when I run a script. Again, this is being run on a shared server. Any further ideas? Thanks, Andrew On 10/28/06, Bastien Koert <bastien_k@hotmail.com> wrote:_________________________________________________________________ Experience Live Search from your PC or mobile device today. http://www.live.com/?mkt=en-caif you are looking to delete the folder when the user leaves or for some other reason, then you need to ensure that the images themselves also have the permissions (0777) to allow you to delete them before you can delete the folder... bastienFrom: "Andrew Darby" <adarby@gmail.com> To: php-db@lists.php.net Subject: [PHP-DB] Permissions for mkdirs Date: Sat, 28 Oct 2006 17:18:47 -0400 Good people of php-db: Forgive me, this is more of a php than a php-db question, but here goes: In a little php/mysql application, I have users ftp over a folder full of images. When they "register" a folder that's not already in the MySQL db, it creates three different folders (thumb, medium, large) with a looped mkdir(). When they register a new image in the db, it resizes into the three folders, then reduces the image in the root of the folder to thumbnail size. The problem I'm running into is with ownership and permissions. I seem to need all folders to have permissions of 777 to work, and then once they've been created, I can't delete them, because I guess they were created by the server rather than me. (I'm on a shared host if this is relevant.) Anybody done something similar before and have ideas of how best to handle this sort of situation? Thanks, Andrew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ Ready for the world's first international mobile film festival celebrating the creative potential of today's youth? Check out Mobile Jam Fest for your a chance to WIN $10,000! www.mobilejamfest.com