Re: Permissions for mkdirs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




chmod will work for both folders and files...

bastien

From: "Andrew Darby" <adarby@xxxxxxxxx>
To: "Bastien Koert" <bastien_k@xxxxxxxxxxx>
CC: php-db@xxxxxxxxxxxxx
Subject: Re:  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@xxxxxxxxxxx> wrote:

if 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...

bastien

>From: "Andrew Darby" <adarby@xxxxxxxxx>
>To: php-db@xxxxxxxxxxxxx
>Subject:  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



_________________________________________________________________
Experience Live Search from your PC or mobile device today. http://www.live.com/?mkt=en-ca

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux