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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:24:02+00:00 2026-05-16T07:24:02+00:00

This might be a noob question, but can’t find an answer anywhere. I have

  • 0

This might be a noob question, but can’t find an answer anywhere.

I have a problem, which Another file permissions problem have helped me to ALMOST solve.

I have created a user in linux (danny) which has sudo access.
I have also created a new group which name ALSO is danny, and added the user danny to that group. This group has sudo (root) access.

I have all files and folders in my www folder owned by danny/danny group.

I have an image-upload code which is php. This code cannot upload images to a folder called “images” folder which is under the www folder, UNLESS I give the images folder 777 permissions.

So, I have followed the answer on the linked question, and have figured out that the user which the upload-script is run as is “www-data“.

According to the answer on the link to the other question I posted, I need to add www-data to a group… But I am stuck here…

Which group should I add to? What should I do from here?

Any tips are appreciated.

Btw, here is some info about www-data and danny

  id www-data:
  uid=33(www-data) gid=33(www-data) groups=33(www-data)
  id danny
  uid=1000(danny) gid=33(www-data) groups=33(www-data)

Thanks and if you need more input, just let me know…

  • 1 1 Answer
  • 1 View
  • 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-16T07:24:03+00:00Added an answer on May 16, 2026 at 7:24 am

    Actually, your problem is that you need the user www-data to have write-access to the images folder.

    And you probably want user danny to have full access to the folder as well.

    EDIT: Additional word of warning:
    having files writeable by your webserver is always a security risk. Be sure to check the files that are written, and make sure people can’t upload or change code.
    Summary:
    * Don’t let your webserver run scripts that are writeable, or in a writeable folder.
    So make sure only the images/ folder is writeable, and doublecheck that everything that is written, is actually an image!

    Either:

    1. Set www-data as owner of the folder,
      and chmod u+rwx www.
    2. Set www-data
      as part of a group X, and change the
      owner of the folder to X, and chmod
      g+rwx www.
    3. Set the folder
      world-writeable on your server (in
      some cases, an acceptable solution
      too, but less secure).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a noob question but I can't find anything wrong with my
This might sound like a noob question, but here it goes anyway. Can BlackBerry
Ok, this might be a very noob question, but I find that PHP Documentation
This might be a simple question, but i can't seem to grasp it. I
This might be a noob question. but I'm really torned between adding documents to
This might sound like a noob question but this is the first time I'm
This might be a noob question but i've been fiddling with it for hours
Hi there this might me a very noob question but I'm stuck, and I'm
This might be a dumb question but I can't get this super simple script
This might be a noob question, but I'm wondering if there's a way to

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.