Results 1 to 3 of 3

Thread: haha?

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default haha?

    So I made this script and got it to make a directory and then another directory inside that one. It's not writing in the permissions I want it to its writing it as 755 as opposed to 777 that I want . Anyways that's not the big problem... The big problem is now my ftp is telling me I don't have persmission to delete the files it wrote. haha? This is my ftp output and below that my php code. Thanks for any help you can offer. Don't know if this is actually the php or just an ftp/ server problem.

    Code:
    19:13:28	Status:	Retrieving directory listing...
    19:13:28	Command:	PASV
    19:13:28	Response:	227 Entering Passive Mode (76,163,112,2,134,233).
    19:13:28	Command:	LIST
    19:13:28	Response:	150 Opening ASCII mode data connection for file list
    19:13:28	Response:	226 Transfer complete
    19:13:28	Status:	Directory listing successful
    19:13:42	Status:	Set permissions of '/bluewalrus.net/travelreports/fff2/images' to '777'
    19:13:42	Command:	SITE CHMOD 777 images
    19:13:42	Response:	550 CHMOD 777 images: Operation not permitted
    19:13:45	Command:	RMD images
    19:13:45	Response:	550 images: Permission denied
    19:13:46	Status:	Retrieving directory listing...
    19:13:46	Command:	PASV
    19:13:46	Response:	227 Entering Passive Mode (76,163,112,2,206,124).
    19:13:46	Command:	LIST
    19:13:46	Response:	150 Opening ASCII mode data connection for file list
    19:13:46	Response:	226 Transfer complete
    19:13:46	Status:	Directory listing successful
    PHP Code:
        <?php
         $filename 
    $_POST['files']; 
         
    $filesgo 'travelreports/' $filename;
         
    mkdir($filesgo0777);
         
    $filesin $filesgo "/images";
         
    mkdir($filesin0777);
        
    ?>
    Last edited by bluewalrus; 12-17-2008 at 04:48 AM.

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    It sounds like it is actually a permissions issue (owner that is). I believe that the php script created the folders using the webserver user (usually www-data or equivalent) instead of the username that you are using when logging into ftp. What you may want to try to use is chown to change the owner of the folders to what you are using in your ftp program. You could also ask your host for support on this as far as finding out what user/group to use for all the folders.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. The Following User Says Thank You to thetestingsite For This Useful Post:

    bluewalrus (12-17-2008)

  4. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Yea contacting the server was needed. Had to change the permissions you were right. Here's what they said though in case someone else is searching...

    You have this issue because you created a folder through php. Our PHP works as apache module. And httpd is apache user. So all files and folders that were created or changed by apache would have httpd as owner. To restore your default owner you should enter your control panel->FTP service->Enable FTP for one of your domain (if you have all turned off)->click edit button and add virtual ftp directory where you have wrong owner for your files. For example yourdomain.com/ After this you will be able to change or delete this files.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •