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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:55:24+00:00 2026-06-04T21:55:24+00:00

On my (shared) webhost, I’m using PHP’s curl and fopen to download and save

  • 0

On my (shared) webhost, I’m using PHP’s curl and fopen to download and save a remote XML-file to a specific directory. The system has to read and execute it later.
Right now, I’ve created the directory beforehand (permissions: 777) and the system is able to write the XML-file in the directory.

I am afraid that giving permissions to anyone to read, write and execute is a security risk.
Therefore, my questions are:

  1. Is setting chmod to 777 a security risk in this case?
  2. Is there a way to achieve the desired results without setting chmod to 777?

(Since I am a beginner, I’m not (yet) familiar with file users, file groups and file permissions. Is there a way that only “the system” is able to read, execute and write?)

  • 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-04T21:55:25+00:00Added an answer on June 4, 2026 at 9:55 pm
    1. You should avoid 777 alltogether.
    2. There is a way. Such problems are better solved via chown than chmod. One way is to make sure the user that writes the files (normally apache or www) belongs to the group of the folder owner then set permissions to maxiamlly 775.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a PHP script on a shared webhost that selects from ~300 'feeds'
Currently I'm using shared webhost (Linux) to host my site. I know that anything
I'm on a shared webhost where I don't have permission to edit the global
My shared hosting service denies the ability to view errors in PHP in php.ini.
My shared hosting package at 1and1 only includes PHP 5.2.17 -- so I can't
I am designing a shared add-in using VB.Net 2008 and VSTO that has to
i just deployed my php/mogodb website (php part in a shared web hosting, and
Today there were some problems with my site: php file uploads weren't handling properly,
I am on shared hosting and have cPanel , Apache, and PHP is run
I'm on a shared hosting environment where for some reason PHP has been complied

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.