FreePgs.com Forum

FreePgs Related => Support Requests => Topic started by: lolo_bee on December 09, 2006, 05:49:58 PM

Title: Problem deleting files
Post by: lolo_bee on December 09, 2006, 05:49:58 PM
Hello' I've been having problems using my ftp account and php user. I'm developing a Picture gallery http://www.marchadenoche.es/galeria (http://www.marchadenoche.es/galeria) and i'm using it in my website. Now i'm posting pictures using a FTP client, when you use the Gallery, a PHP scripts generates thumbnails and resizes original picture. But here's the problem, when php tries to resize the picture it reports an error: "Cannot open file xxxxxxx.jpg for writing", if I change folder and files rights from my FTP client, it works perfectly. But, thumbnails are created in another folder that PHP creates, and thumbnail's owner is PHP user, I tried to change rights using
chmod('pic.jpg',0777);
but i still cant delete the folder and files, even if I use
chmod('pic.jpg',7777);
I think i can use chown(), but I don't know if using
chown('pic.jpg','Lolo_bee');
will work. Lolo_bee is my freepgs account username.

Best regards, Manuel Borrego
www.marchadenoche.es (http://www.marchadenoche.es)
Title: Re: Problem deleting files
Post by: admin on December 10, 2006, 06:57:04 AM
The problem is that when scripts create files, they will be created as the webserver user and not the correct username.  (We reverted to this behavior due to all of the problems with users files being overwritten in the past)

You can use the Contact Form if you wish us to chown your entire folder to the correct username.  Otherwise, the directories will need at least 770 permissions.

Thank you,
FreePgs.com Admin
Title: Re: Problem deleting files
Post by: lolo_bee on December 10, 2006, 11:25:40 AM
I was thinking about that.

First thing I'd like to say is THANK U for the fastest support on earth.

No problem, I'll develop a script for managin' Gallery's pictures.

Best regards. Manuel

P.S.: Merry Christmas!!