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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:05:58+00:00 2026-06-11T10:05:58+00:00

As the title suggests, I need the ability to create, move, and delete files

  • 0

As the title suggests, I need the ability to create, move, and delete files and folders from php.

If I CHMOD all directories and files to 777, everything works great, but if I do 755 then the scripts die with errors about permissions.

From what I’ve read, using 777 permissions is insecure and should not be done. I have a VPS, but there are multiple users as I host a number of websites (some of which other people are in control of) and, regardless, I want to do whatever is the “best practice.”

So, basically, what I’m wondering is how I should go about this? I’m new to php and “webmastering” and am not sure what to do.

Could anyone point me in the right direction?

One last note: In addition to being able to move and delete files that have been created from php, the scripts also need to move and delete files that have been uploaded via FTP from a Windows machine (I’ve noticed that by default when I upload files the CHMOD is 755).

EDIT: I it may be relevant for me to mention that I ran phpinfo() and found the following under the section “PHP Credits”:

User/Group      nobody(99)/99 
  • 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-11T10:05:59+00:00Added an answer on June 11, 2026 at 10:05 am

    Permissions are set for what the owner can do, what the owner’s user group can do (the owner’s peers in the same user group), and what everone else can do. That’s what the 3 numbers are for: 753 is a “7” for the owner, a “5” for the group, and a “3” for everyone else. A “7” is full access (read, write, execute). A “5” is read and execute. You need write access to delete.

    You should really read up on linux file permissions to see how they work.

    I would recommend you use 775 or 770. The last digit is what anyone on the system or any shmoe browsing your site can do, so you want it as low as possible.

    As far as your ftp script and your future other-users, just make sure they are in the same group as your apache user. Or, set up a group for those account you want to have access, and add your apache account to it.

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

Sidebar

Related Questions

Like the title suggests I need to do something like so... $i++;//we all know
As the title suggests, I need a workaround to prevent mobile safari from scrolling
So as the title suggests I wish to create a new dom element (the
As the title suggests is it possible to execute another java app from within
Basically, as the Title suggests, are there any open source PHP scripts out there
In my app I need to create an event in the Calendar programmatically, all
As the title suggests I need a C# equivelant of ROUNDDOWN. For example, if
As the title suggests, I need to grant the execute permission on every stored
As the title suggests I would like to be able to use data from
As the title suggests, do we need force jvm to exit when get InterruptedException?

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.