Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8481859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:40:31+00:00 2026-06-10T19:40:31+00:00

I’m trying to use this Dagon Design PHP form to help a local non-profit

  • 0

I’m trying to use this Dagon Design PHP form to help a local non-profit publication enable their readers to submit photos. I’ve got the “mailer” part working — the notifications work fine — but the “saving a file to a folder” part isn’t functioning.

On the form page, the author says “the directory must have write permissions,” but I’m not sure “who” is writing to that folder — is this PHP script considered “Owner” when it saves something on my site? Or do I need to allow save permissions for Owner, Group and Others?

I’m not sure why the script isn’t saving the photos, but this seems like a good place to start. I’ve tried looking around on Stack for answers, but most questions seem to have to do with folder creation/permissions.

The page I’m clumsily trying to build is here, if that helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:40:33+00:00Added an answer on June 10, 2026 at 7:40 pm

    As Jon has said already, you don’t want to allow write access to everyone.

    It’s also possible (depending on the hosting) that something like suEXEC is being employed – which will cause your PHP script to run as a user other than the webserver’s (as reported by Dunhamzzz).

    Probably your best approach, in my opinion, is a script calling whoami:

    passthru('whoami');
    

    Or alternatively you could try:

    var_dump(posix_getpwuid(posix_geteuid()));
    

    Bear in mind, this does give system information away to the world – so delete the script once you’ve used it!

    Then, as you’ve correctly asserted in your question, it’ll likely be the file permissions.

    If you do have CLI access, you can update the permissions safely as so (first command gets the group)

    id -n -g <username>
    chmod 770 <directory>
    chown <username>:<group> <directory>
    

    (You may have to pre-pend “sudo” to the “chown” command above, or find other means to run it as “root”…, reply back if you get stuck.)

    If you’ve not got access to run command-line, you’ll presumably be doing this via a (S)FTP client or the alike. I’m afraid the options get a little to broad at that point, you’ll have to figure it out (or reply back with the client you’re using!)

    As always, YMMV.

    Finally, bear in mind if this is your own code, people will at some point try uploading PHP scripts (or worse). If that directory is accessible via a public URL … you’re opening the hugest of security holes! (.htaccess, or non-document root locations are your friend.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.