chmod and cgi correlation


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers chmod and cgi correlation
# 1  
Old 12-01-2003
Question chmod and cgi correlation

How much do chmod settings affect cgi scripts?? I have a "webmaster" at my work that says I cannot change the permissions on the cgi scripts, and that they work with only certain permissions.

They are set for 644, I want to change them to 775 and put her in her own group, like she should be, not with roo access.

Anybody help me? Thanks!!
# 2  
Old 12-01-2003
I have cgi scripts with 755 - under different owners/groups.

If I change one to 644, it does not work since it is no longer executable. User nobody should be the uid for anyone hitting the web page/executing the cgi script. That is why 755 is needed. You could change it to 645 and it would work.

Are you confusing chmod with chown/chgrp? You mention putting her in a different group with no root access?
# 3  
Old 12-01-2003
The server was not orginally setup correctly. She should be in a group, special privilage group or some other, and have her log in thru her user name and not the root user.

We are a very small company, less than 50 full-time, and have recently had an email sceurity issue.

The server needs to be setup correctly, and she is giving me every excuse not to change anything on the webserver, i.e. if i change the permissions for the cgi scripts to 775, so that she can access the from a group, she would have to re-write the scripts to fix the permissions change.

Everything that I have read thus far and been told, says that that is pig swallow. I'm just trying to find out. I don't want to change the permissions and the websites (VPS) go down.

I hope I've made myself clear, and I thank you for your understanding and quick response!
# 4  
Old 12-01-2003
Quote:
She should be in a group, special privilage group or some other, and have her log in thru her user name and not the root user.
Yes, that is exactly right - even if she has root access, she should be going in under her own account and doing a su to root or you should get sudo on the system to control what she can do.

Quote:
she is giving me every excuse not to change anything on the webserver, i.e. if i change the permissions for the cgi scripts to 775, so that she can access the from a group, she would have to re-write the scripts to fix the permissions change
Get everything in writing (email) and then find a source that shows she is wrong (your source should be your hardware/software vendor or more than one source (faq, mailing lists) that show the same type of answer).

What httpd are you running? What OS and version?
# 5  
Old 12-01-2003
Apache v1.1

FreBSD 4.4-Release (Server)

I have not been able to find anything that would prove her wrong; but, I have not found anything, or anyone that will confirm what she says is correct.

Thnx
# 6  
Old 12-02-2003
You first need to upgrade your Apache version - 1.3 came out in 1998 and 1.1 is not even mentioned in the quick search I did.

Start reading up on security on the Apache site. See this for a good start. Get a test server (can be your workstation) and run it to find holes in your current configuration.

This all started (from what you wrote) with email security issues. Sounds like you have issues with security in everything. Start searching the web for security relating to the products you are running. You have some reading to do.
# 7  
Old 12-02-2003
A cgi doesn't have to have some absurdly dangerous umask in order to work. It follows the same rules as any other UNIX binary. For users that maintain websites, I will typically let the owner own his own files and use extended ACLS(s) for the web server and other users. See the man pages for getfacl and setfacl.

Here's an example of a cgi/permissions:

-rwx------+ 1 kduffin sysops 7255 Dec 2 19:24 some.cgi

Looking at the extended acl with getfacl (getfacl some.cgi):

# file: some.cgi
# owner: kduffin
# group: sysops
user::rwx
user:nobody:r-x #effective:r-x
group::--- #effective:---
mask:r-x
other:---

Cheers,

Keith

Last edited by kduffin; 12-02-2003 at 12:12 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Correlation Between 3 Different Loops using Bash

I have 3 loops that I use to determine the permission level of AWS user accounts. This array lists the AWS policy ARN (Amazon Resource Name): for ((policy_index=0;policy_index<${#aws_managed_policies};++policy_index)); do aws_policy_arn="${aws_managed_policies}" ... (1 Reply)
Discussion started by: bluethundr
1 Replies

2. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

3. Shell Programming and Scripting

Perl cgi pages out of cgi-bin folder in WINDOWS

Hi team, I have a typical problem with cgi pages in apache webserver in WINDOWS I am able to execute(display) the pages that are saved in cgi-bin folder. But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder. Could anyone please let me know how... (1 Reply)
Discussion started by: scriptscript
1 Replies

4. Shell Programming and Scripting

Pearson correlation between two files

Hi, I want a quick way to determine the pearson correlation between two files. The two files have the same format with only the 3rd column varying. E.g. of file 1 chr1 0 62 chr1 1 260 chr1 2 474 chr1 3 562 chr1 4 633 chr1 5 870 chr1 6 931 chr1 7 978 chr1 8 1058 chr1 9 1151 E.g.... (1 Reply)
Discussion started by: kylle345
1 Replies

5. Shell Programming and Scripting

AWK - calculating simple correlation of rows

Is there any way to calculate a simple correlation of few selected rows with all the rows in input ? In the below example I selected Row01,02,03 and correlated with all the rows. I was trying to run in R. But the this big data matrix is too much to handle for R and eventually my system is... (3 Replies)
Discussion started by: quincyjones
3 Replies

6. Shell Programming and Scripting

Calculate Correlation between two fields !

Hello, I request your help with a shell script (awk) that ask for two inputs in order to calculate the correlation of the last rows between two fields ( 3 and 4). Data: EC-GLD,1/25/2011,41.270000,129.070000 EC-GLD,1/26/2011,41.550000,129.280000 EC-GLD,1/27/2011,42.260000,127.800000... (1 Reply)
Discussion started by: csierra
1 Replies

7. Shell Programming and Scripting

correlation coefficient - Awk

Hi guys I have an input file with multiple columns and and rows. Is it possible to calculate correlation of certain value of certain No (For example x of S1 = 112) with all other values (for example start with x 112 corr a 3 of S1 = x-a 0.2 ) INPUT ******* No S1 S2 S3 S4 Sn a 3 ... (2 Replies)
Discussion started by: quincyjones
2 Replies

8. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

9. Shell Programming and Scripting

CGI passing arrays/hashes to another CGI script

If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link? Hope that makes sense! :) (2 Replies)
Discussion started by: WIntellect
2 Replies
Login or Register to Ask a Question