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 9149569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:29:42+00:00 2026-06-17T11:29:42+00:00

I developed a PHP script to add new files based on a template. I’m

  • 0

I developed a PHP script to add new files based on a template. I’m running it on localhost by now. I wondered what is the best chmod setting for the folder the script is in (and where the new files should go). 644 says permission denied, 622 works, 666 works (I can only choose 6, 4, 2 and 0 from the Info panel on my mac). By the way, I noticed the third number matters, how can I set it up to be the second or first?

EDIT
So how do you change chown on a Mac for localhost?

  • 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-17T11:29:42+00:00Added an answer on June 17, 2026 at 11:29 am

    The third number relates to Everyone (the first two are Owner and Group). 4 is read only which is why that does not work, 2 is write only and 6 is read/write (7 is read/write/execute).

    In general, you should not be giving everyone write access to your server. The best approach where write access is required is to use chown to change the owner and/or group to match the user that your webserver is running as, then use 644 or 664.

    For Mac, this thread: Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X? provides some pointers on how to do this securely.

    If you just want to change your upload folder, try:

    sudo chgrp _www /path/to/upload/folder
    sudo chmod 664 /path/to/upload/folder
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP-script originally developed on Ubuntu, which now has to run on
I have over 1000 clients and I developed a simple PHP script to loop
I developed a script in php to draw the sound wave of a wav
I have developed a PHP script that uses $_REQUEST[] superglobal. A typical client request
I've developed a Flash quiz app for facebook, which calls for a php script
I have developed a script that uses php's imap_search and when it gets to
I was going to add a shebang line to a php script #!/bin/env php
I have developed a script that receives json data from a php script using
I've written a PHP script that takes in two CSV files, processes them and
I am testing a php script that has been developed on an OS-X system

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.