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 am trying to manipulate a conditional string outputted from SAS into the right
I am trying to use Python in order to manipulate a text file from
I am trying to manipulate a wave file header. I have loaded the file
I'm trying to manipulate an audio file (mp3), using <audio> and javascript but nothing
Hey guys I am trying to manipulate a word .docx file using the openXML
I am new to programming, trying to copy files from one location to another,
I am trying to open a log file and manipulate lines if required. For
I'm trying to read an excel file from C# using COM, and can get
I have the following file I'm trying to manipulate. 1 2 -3 5 10
I am trying to manipulate the hash returned from Yahoo Finance for their Standard

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.