Suexec solution


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Suexec solution
# 1  
Old 01-10-2005
Suexec solution

guys here's a section of my program written in perl. This part is used to create directories with 777 mode. Now i know about 777 being a security hole. Could anyone provide me a possible solution to this using suexec?????????

Segment
Code:
system mkdir ".$file_folder", 0777 or die "Can't make dir: $!";
system "chmod 777 .$file_folder";

# 2  
Old 01-10-2005
I am a real noob when it comes to uid and everything that follows it Smilie I need help asap guys
# 3  
Old 01-10-2005
Its not real clear what it is you are asking for. Do you need help with setting permissions or do you need help with suExec?

suExec --> Support Information
Permissions --> Understanding Unix Permissions
# 4  
Old 01-10-2005
well its just that I'm a total noob in everything related to Unix.
What i meant there was , in the code segment as u can see directories are created with 777, i was wondering how suexec can be used to overcome that problem in the code???
# 5  
Old 01-11-2005
Why do you need suexec? Why not simply change the permissions in the code to something like 755?
# 6  
Old 01-11-2005
i did ask about that , my superior told me that apache logged in differently on the server i am working on and it needs apache to have all permissions(dont ask me about that ) and boss says he wud appreciate it if the soln was an suexec one
# 7  
Old 01-12-2005
Reference:

http://lists.evolt.org/archive/Week-...14/145126.html

Quote:
SuExec scenario:
If suExec is running, Perl runs as the owner of the script and gets it's permissions from the target file's owner bit (rw - -). Assuming that the script and the target file are owned by the domain user, that allows Perl the security of being able to write to the target file while not setting the world bit to a level allowing others to write to it. Problem: PHP still needs world write permission to write to target files and that allows both PHP and Perl in other domains permission to also write to the target file.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SUEXEC with passwordless option

Hi, I am using the below command in suexec -u webuser /local/Tomcat7//0/tc7u/tomcat7.sh status But it prompts for the password of executing user. Let me know if any options available for passwordless or supplying password in script. (0 Replies)
Discussion started by: pravinbtech
0 Replies

2. UNIX for Dummies Questions & Answers

How to use Suexec with Apache2 ?

Hello guys I'm trying to use Suexec in my computer. I've installed apache with default settings (so Suexec is installed with my emerge Apache , Gentoo) . My settings on /etc/conf.d/apache2 # SUEXEC Enables running CGI scripts (in USERDIR) through suexec. # USERDIR Enables /~username... (1 Reply)
Discussion started by: kernings
1 Replies

3. UNIX for Advanced & Expert Users

suexec problem

Hi all, I am trying to setup apache w/ suexec to avoid permission problems w/ apache user and website user and also to be able to run a second (test) domain on the same server. So far I got fcgi w/o suexec running perfectly (logs confirm that). But as soon as I enable the suexec statement in the... (0 Replies)
Discussion started by: harrstar
0 Replies

4. UNIX for Advanced & Expert Users

apache suexec

I compiled apache 1.3.33 with suexec support like ./configure \ "--with-layout=Apache" \ "--prefix=/usr/local/apache" \ "--enable-module=ssl" \ "--activate-module=src/modules/php4/libphp4.a" \ "--activate-module=src/modules/perl/libperl.a" \ "--enable-module=perl" \ "--enable-module=most"... (0 Replies)
Discussion started by: hassan1
0 Replies
Login or Register to Ask a Question