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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:21:57+00:00 2026-06-13T14:21:57+00:00

I am using a python cgi-script and using it for few webpages on my

  • 0

I am using a python cgi-script and using it for few webpages on my server, Everything works fine when permission is manually set to 755.

But When i edit with some software for eg coda . It uploads with different permissions so, I have to manually again change the permission . I am sick of doing that every time my

.htaccess file has this thing in it

Options +ExecCGI
AddHandler cgi-script .py

If you have any other alternate or solution to this problem so that i can set like chmod 755 for every .py script or something like that. DO tell.Like any shell script which i can run one time and then do the same. I am using ubuntu 12 server

I tried this, but,

#!/bin/bash
file=`find *.py`
chmod 775 $file

it can be used in bulk.

  • 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-06-13T14:21:59+00:00Added an answer on June 13, 2026 at 2:21 pm

    It seems that the permissions set upon upload are configurable in coda.

    Alternatively, you could use inotifywait on the server (from inotify-tools) to add the executable bit whenever the scripts are modified:

    $ inotifywait -c -m -e modify -e create -e attrib  path/to/cgi-bin/ \ 
    | while read pth; do
        chmod +x "$(echo $pth | awk -F, '{print $1$3}')"
    done
    

    Or just while /bin/true; do sleep 5 && chmod 755 path/to/cgi-bin/*.py; done – it shouldn’t matter that much.

    If you are feeling adventurous, you could also use Python’s built-in http server module and a CGIHTTPRequestHandler with an overloaded is_executable() method.

    Still, I’m curious to see if this can be handled entirely from the apache config. Cheers.

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

Sidebar

Related Questions

I'm using pycurl to upload a file via put and python cgi script to
I'm writing a python CGI script that will query a MySQL database. I'm using
Is it possible to execute a python-script on a server without using something like
Using a python cgi script and I have a form with both a Submit
im using a python script to display text to the screen with ajax but
I'm using Python with the NLTK toolkit in Apache via CGI. The toolkit need
I have a python cgi script (just python, I didn't use any framework). It's
I am trying to set up django shared hosting at iPage.com using FastCGI but
My python2 script uploads files nicely using this method but python3 is presenting problems
I'm using Python in a webapp (CGI for testing, FastCGI for production) that needs

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.