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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:30:01+00:00 2026-05-28T01:30:01+00:00

this might seem like a stupid question but I’ve Googled to no avail. I’ve

  • 0

this might seem like a stupid question but I’ve Googled to no avail.

I’ve always thought of PHP as a language for creating dynamic database driven sites, and I’ve never thought about using it to move system files on the actual server (as I have never had a need to). My question is:

  1. can a standard PHP 5.3.x.x installation move, copy or edit system files (I’m using a Linux sever as an example) around in /bin or maybe /etc?
  2. is this a good idea/practise?

It has never occurred to me that if a malicious hacker were to be able to inject some PHP into a site, that they would effectively be granted access to the entire Linux server (and all its system files). I have only ever thought of PHP as something that operates inside the /vhosts directory (perhaps naively).

Sorry if this sounds like a stupid question, but I can’t really test my theory as if my boss was to see me writing/uploading/executing a script that moved stuff around in the Linux file system I would be dead.

Thanks for your help guys! 🙂

  • 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-05-28T01:30:02+00:00Added an answer on May 28, 2026 at 1:30 am

    PHP can to your server whatever the permissions of the user account it runs as allow it to do. PHP as a language is not restricted in any way (at least, in terms of permissions), it is the user account that is restricted.

    This is why people will usually create a user for Apache/nginx/insert web server here to run as, and only give it permissions to manipulate files and directories related to the web server. If you don’t give this user access permissions to /bin or /etc, it’s can’t do anything that will affect them.

    is this a good idea/practice?

    Normally not. Leave system administration to your sysadmin and not the user requesting your PHP scripts.

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

Sidebar

Related Questions

This might seem like a stupid question but I have always wondered. What would
This might seem like a stupid question but it's been a long day. I'm
This might seem like a stupid question, but I got this ASP.NET MVC 3.0
This might seem like a stupid question I admit. But I'm in a small
[I realise this might seem like a stupid question but I am lost.] Using
Might seem like a stupid question, but I'm having an issue creating an array
This might seem like a stupid question but it's really bugging me. Basically, I
This might seem like a very easy question for some of you folks, but
This might seem like a weird question, but bear with me. I'd like to
This might seem like a trivial question, but I'm a bit muddled in my

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.