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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:20:51+00:00 2026-05-24T02:20:51+00:00

I have a question related to user permissions in python. I have a project

  • 0

I have a question related to user permissions in python. I have a project that uses the file system to store information about specific tasks. Of course this can be edited/deleted if user wants to. Now say a user starts the program using sudo sh start.sh. He then does some operations and data is stored. Now if anyone else or even the same user will start the program without sudo rights when trying to delete/modify those file a permission denied OSError is raised. Now this seems logical but my question is:

  1. Does python offer any way to choose the permissions when writing/creating a file/folder? More precisely can you create files that will be accessible to all users from sudo ?

  2. Does python offer any way to request a users permission when starting the program/ during program execution?

Regards,
Bogdan

  • 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-24T02:20:52+00:00Added an answer on May 24, 2026 at 2:20 am

    Looks like you need os.fchown().

    I don’t know what you mean by your second question – do you want to ask for a root password and use it to gain access to a file that the normal user wouldn’t have access to?

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

Sidebar

Related Questions

I have a question related to understanding of how python dictionaries work. I remember
Another question related to this one . I have a List<SortableObjects> that is the
i have a question that is more design and architecture related. I am coming
I have a question about best practices related to de-normalization or table hierarchy relationships.
I have a question related to trees. I have about 100 sentences on a
Earlier, I asked a question about getting windows active directory information from the user
I have a question related with JPopupMenu that maybe someone can help me. As
I have question related to what is done in SMS application is if i'm
I have a question related to how relative paths are interpreted in various environments
I have a question related to this one . I don't want to do

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.