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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:23:28+00:00 2026-06-01T11:23:28+00:00

I have a LAMP server where I’ve run the following commands to set permissions

  • 0

I have a LAMP server where I’ve run the following commands to set permissions of files in /var/www:

groupadd web
usermod -a -G web my_user
chown -R root:web /var/www
chmod -R 775 /var/www
chmod -R g+s /var/www

My goal is to have all files writable by any member of the “web” group. Is there a secure way to allow file uploads (e.g. within WordPress) without changing the file ownership? Note: this is a private server.

  • 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-01T11:23:30+00:00Added an answer on June 1, 2026 at 11:23 am

    One way of applying permissions to just directories is to use the find command. For example:

    # Set the owner and group on everything.
    chown -R root:web /var/www
    
    # Make *directories* read/write/execute and set the `sgid` bit.
    find /var/www -type d -print | xargs chmod g+rwxs
    

    You don’t want to run chmod -R 775 /var/www because this will make all your files executable, which is probably not what you want.

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

Sidebar

Related Questions

I have a LAMP server configured with DocumentRoot /var/www changed to VirtualDocumentRoot /var/www/%-3/ in
I have a PHP script running on my LAMP server that requires certain files
So I have a server set up (LAMP) server, this proxy has access to
I have some basic pageview incrementing code set up on a LAMP server (see
My LAMP web server renders backup files like these: !index.php !~index.php bak.index.php Copy%20of%20index.php I
I have an offline kiosk computer that will be running a LAMP web server
I have set up a LAMP server on aws. I am planning to create
I have setup the basic LAMP server on Ubuntu 11.10 and had a few
I have a php mail script sitting on a LAMP vps server. The script
I have a LAMP server (Quad Core Debian with 4GB RAM, Apache 2.2 and

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.