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

  • Home
  • SEARCH
  • 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 5845269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:24:37+00:00 2026-05-22T12:24:37+00:00

Imagine a web application that performs two main functions: Serves data from a file

  • 0

Imagine a web application that performs two main functions:

  1. Serves data from a file that requires higher privileges to read from
  2. Serves data from a file that requires lower privileges to read from

My Assumption: To allow both files to be read from, I would need to run node using an account that could read both files.

If node is running under an account that can access both files, then a user who should not be able to read any file that requires higher privileges could potentially read those files due to a security flaw in the web application’s code. This would lead to disastrous consequences in my imaginary web application world.

Ideally the node process could run using a minimal set of rights and then temporarily escalate those rights before accessing a system resource.

Questions: Can node temporarily escalate privileges? Or is there a better way?

If not, I’m considering running two different servers (one with higher privileges and one with lower) and then putting them both behind a proxy server that authenticates/authorizes before forwarding the request.

Thanks.

  • 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-22T12:24:38+00:00Added an answer on May 22, 2026 at 12:24 pm

    This is a tricky case indeed. In the end file permissions are a sort of meta-data. Instead of directly accessing the files, my recommendation would be to have some layer between the files in the form of a database table, or anything that could map the type of user to the file, and stream the file to the user if it exists.

    That would mean that the so called web application couldn’t just circumvent the file system permissions as easy. You could even set it up so that said files did not have server readable permissions, and instead were only readable by the in between layer. All it could do is make a call, and see if the user with given permissions could access the files. This lets you also share between multiple web applications should you choose. Also because of the very specific nature of what the in between layer does, you can enforce a very restricted set of calls.

    Now, if a lower privileged user somehow gains access to a higher privileged user’s account, they’ll be able to see the file, and there’s no way to really get around that short of locking the user’s account. However that’s part of the development process.

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

Sidebar

Related Questions

Imagine that you want to develop a non-trivial end-user desktop (not web) application in
Imagine a web application written in Ruby on Rails. Part of the state of
I'm designing my database and LINQ To SQL ASP.NET web application. Imagine I have
Imagine a Java client/server ERP application serving up to 100 concurrent users, both web
I have what I imagine to be a pretty standard web-interface. There are 4
Imagine you homebrew a custom gui framework that doesn't use windows handles (compact framework,
Imagine we have a program trying to write to a particular file, but failing.
I am building a rather larger web application with javascript and PHP. The app
I have a web solution that contains 5 class libraries and one asp.net web
Ok, so I'm building a website that has client profiles. A web user finds

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.