running scripts with user permissions

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
251
Hi.

I'm using suphp.

In theory, everything works fine.

There is a problem with applications that are set to the default path of "/tmp" for sessions.

The path can be changed, but many users don't want do to that.
The problem is that suPHP does not support the chmod higher than 775.

You have it any way?

I can use mpm_itk module but be lower performance.

Maybe some entries in the virtualhost (alias / redirect / whatever)? :)

Please help.

Sorry for my English:]

Regards
 
You should never need anything higher then 755. If you do something is majorly wrong with your server or code.
 
For users who have kindly do not want to change the path to the session save directory.

If they want to use "/tmp" must have 777 chmod. In that case suphp dosen't work.

prawdopodbnie będę musiał przekonać użytkowników żeby dokonali zmian w swoich skryptach :].

I think so is the best solution (maybe not easiest).
 
I wrote a sentence in Polish;).

It should be:
Probably I will have to convince users that have made changes in their scripts:].
 
Im not sure about that.. but my /tmp is 777 and sessions are working just fine, but im using mod_ruid2 and not php as cgi.

Regards
 
Perhaps this combination allows for 777 directories.

Do you think that it would not be slower than CGI?
 
I tried to run mod_ruid2.
I did it according to the guide (http://www.directadmin.com/forum/showthread.php?t=37467&page=1)

An error has occurred:
[Fri Mar 16 11:48:01 p.m. 2012] [error] [client 164,126,183,147] Premature end of script headers: index.php, referer: https://selser.pl/logowanie
[Fri Mar 16 11:48:01 p.m. 2012] [error] [client 164,126,183,147] SoftException in Application.cpp: 249: File "/ home / selmax / domains / selser.pl / public_html / app / webroot / index.php

You may know what may be the result?

Almost always there are some problems:]
 
It works.
Reboot helped.

I do not know why, but it works :)

Scripts actually run faster :D.

Thanks

Regards
 
There is a problem with applications that are set to the default path of "/tmp" for sessions.

The path can be changed, but many users don't want do to that.
The problem is that suPHP does not support the chmod higher than 775.

That is not quite correct. suPHP does not allow to run PHP scripts from world-writable directories, that's it. But you still can have /tmp chmoded to 777.
 
You know how exactly modruid2 works.

For mod_itk all apache processes are started with the user permissions (the same CGI).
With modruid2 not all processes are run with user permissions. The rest of the httpd user has permission.

I configured something wrong or is normal?
 
With modruid2 not all processes are run with user permissions. The rest of the httpd user has permission.


What do you mean? Examples and screenshots would help us to understand you better.
 
This is what I wrote earlier is wrong.

Htop incorrectly showed the process owner (almast all httpd process have user apache).
In the same time top shows the correct values.
 
Back
Top