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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:14:42+00:00 2026-05-23T03:14:42+00:00

I am trying to manipulate a file and create a new folder from within

  • 0

I am trying to manipulate a file and create a new folder from within a web service and am running into a permission denied error. What is the recommended way to configure these permissions? The use case is as follows.

  1. A user name is passed as a parameter in the URL along with a command.
  2. Based on the command, I am trying to create a file or copy some files over to a specific user directory. Safe to assume that this user is different from the user that owns tomcat.
  3. Is it possible to impersonate a system user for running other processes/shell scripts from within the web service?
  • 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-23T03:14:43+00:00Added an answer on May 23, 2026 at 3:14 am

    By default your web service runs as an non privileged user, for example www-data. Your web service can only create files in directories that it has write access to.

    For security reasons it is a bad idea to give a web service any kind of write access to full user directories. You could do something like:

    1. Make a separate upload folder for each user /home/[username]/webuploads
    2. give www-data write permissions to that folder
      • chmod a+rw /home/[username]/webuploads
      • or setfacl -m u:www-data:rwx /home/[username]/webuploads if your filesystem supports acl lists

    This gives your webservice the ability to write into other users home directories, but also does not allow the service to overwrite everything in the users directories.

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

Sidebar

Related Questions

I have the following file I'm trying to manipulate. 1 2 -3 5 10
I'm trying to concatenate every file in a folder in lua to compile a
I'm trying to create a PhoneGap application that in part, makes available a custom
I am trying to parse an XML File, but there is one place where
I'm trying to write a program that merge two or more .dat files in
Well, a often discussed thing. But I can't get it work. What has to
I am using the Workflow Services Java API (11.1.1) for SOA Suite to access
I have a rails 3 app where I am using the 'face' gem to
using globals.h im hoping to store a vector of rectangles and also a collision

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.