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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:04:29+00:00 2026-05-31T13:04:29+00:00

I wrote a python program that needs to call aircrack program to some tasks,

  • 0

I wrote a python program that needs to call aircrack program to some tasks, but I run into trouble with the privilege. Initially the aircrack program is called in command line, it requires “sudo” at the beginning. After that I checked the location of the executable and found that it locates under /usr/sbin/. Right now my program is driven by apache and the default user is www-data. If I execute the program with user www-data without “sudo”, it won’t give any result.

I googled a little bit on this problem, and found that we can change the owner of aircrack program by executing sudo chmod 4755 /usr/sbin/airodump-ng. I tried it and the privilege is changed from -rwxr-xr-x to -rwsr-xr-x. I executed the command once again without “sudo” but it doesn’t make any difference.

My questions is that: how can I change the privilege of a program so that it can be executed by any user without “sudo”? If I run the program with “sudo”, then the output files are owned by “root”, which adds more complexity to my program. Please help, 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-31T13:04:30+00:00Added an answer on May 31, 2026 at 1:04 pm

    first, none of us can replace the chmod man page (so i’ll start by quoting it):

       A numeric mode is from one to four octal digits (0-7), derived by adding up the bits 
       with values 4, 2, and 1.  Omitted digits are assumed to be leading zeros.  The first
       digit  selects the set user ID (4) and set group ID (2) and restricted deletion or 
       sticky (1) attributes.  The second digit selects permissions for the user who owns the
       file: read (4), write (2), and execute (1); the third selects permissions for other 
       users in the file's group, with the same values; and the fourth for other  users  not
       in the file's group, with the same values.
    

    so, if you want the program to be executable by all users, you ‘chmod 111 file’. however, iirc you need read permissions as well for most things, so ‘chmod 555 file’. also, the reason i’m making the bits the same is because you said you wanted ‘everyone’ to be able to do some.

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

Sidebar

Related Questions

I am trying to write a cross-platform python program that would run in the
I wrote a Python program that acts on a large input file to create
I have a python program in an embedded system that needs to write to
I have python script that works fine but only when run as stand-alone, while
I am trying to write a python program that calculates a histogram, given a
A while back I wrote a simple python program to brute-force the single solution
I wrote a basic Hippity Hop program in C, Python, and OCaml. Granted, this
If I write program in python 2.7 and I want to run another script
I'm trying to write a program in Python and I'm told to run an
I'm trying to write a program which, at some point, needs to invoke an

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.