Broadband
Dial-Up
Email
Hosting
Wireless
Security
Useful Tools
Quick Reference
Contact Us
Customer Portal
Site Search

Zen Internet Support Forum

Welcome to the Zen Internet community support forums.

Before posting we recommend you search our
extensive Knowledge Base or the forum archives
as an answer to your query may already be available.

Welcome to Zen Internet Support Forum Sign in | Join | Help
in
Forums Forum Rules

Creating and moving files in my webspace

Last post 24-10-2006, 12:36 AM by James Sweet. 2 replies.
Sort Posts: Previous Next
  •  23-10-2006, 7:46 AM 21241

    Creating and moving files in my webspace

    I have a Bronze Linux hosting package with Zen.  I am using PHP to handle a file upload from a form as follows:

    move_uploaded_file($_FILES['imageFile1']['tmp_name'],"/data01/username/public_html/myupload.jpg");

    but its failing with the following error:

    Warning: move_uploaded_file(/data01/username/public_html/myupload.jpg): failed to open stream: Permission denied

    The folder I am trying to move the file to is set to 777, so I don’t know why I am getting this error.  I get the same error trying to use mkdir.  Is it a problem with my php, or a configuration issue?
  •  23-10-2006, 10:53 PM 21302 in reply to 21241

    Re: Creating and moving files in my webspace

    Figured it out in the end.  The directory was actually 755 despite what I had though.  I got this wrong because when I clicked on change permissions in the file manager, it was coming up with 777, but that was not what it was actually set to.  I didn't notice the little numbers on the right in the directory listing that show what the permissions actually are.
  •  24-10-2006, 12:36 AM 21307 in reply to 21302

    Re: Creating and moving files in my webspace

    Thanks for posting!

    It did sound a lot like permissions, now you come to mention it I do recall seeing this oddity in the cPanel file manager myself.

    Kindest regards,

    James Sweet
    http://www.zen.co.uk
View as RSS news feed in XML