Web Hosting Talk







View Full Version : Changing Perl Permissions to 777


jasontd101
11-10-2002, 04:17 PM
Does anyone know how to change the permissions on my server so that clients can run perl scripts in the cgi-bin at chmod 777. Right now the way it is setup the highest they can run them at is 755. Anyone have a good solution to this problem?
I am running Redhat 7.3

Thank you!

bear
11-10-2002, 04:19 PM
That's a pretty bad idea. Why would you want world read-write-execute permissions on a cgi script?

jasontd101
11-10-2002, 04:28 PM
I have a client who I trust and has been with me for a while. My old server whom I had through Alabanza had the setting like this and he was able to setup his replcator programs no problem. Now I have ventured outside of Alabanza and have my own servers. He is now moving his sites to my server and need to have permission to execute his perl scripts at 777. If there is a way to do that for just him great! If not I would turn it on for all then turn it off when he is done. Any ideas?

Thanks again

CipherVendor
11-10-2002, 04:45 PM
Disable suexec to be able to execute scripts with permissions set as 777.

jasontd101
11-10-2002, 04:54 PM
I am sorry I am really new to this I have never had to work with suexec before. What would be the command to disable it and would I need to do anything else once it is disabled. Also is it difficult to turn it back on? One my client is done running his script I will want to turn it back on.

Thank again!

CipherVendor
11-10-2002, 05:05 PM
Upon startup of Apache, it looks for the file "suexec" in the "sbin" directory (default is "/usr/local/apache/sbin/suexec"). If Apache finds a properly configured suEXEC wrapper, it will print the following message to the error log:

[notice] suEXEC mechanism enabled (wrapper: /path/to/suexec)

If you don't see this message at server startup, the server is most likely not finding the wrapper program where it expects it, or the executable is not installed setuid root.

If you want to enable the suEXEC mechanism for the first time and an Apache server is already running you must kill and restart Apache. Restarting it with a simple HUP or USR1 signal will not be enough.

If you want to disable suEXEC you should kill and restart Apache after you have removed the "suexec" file.*

Alternatively you can just change the permissions on the files and once they've been executed you can change them back. For instance:

Running this command in the directory with the files you want to change permissions on will alter them from 777 to 755: find . -perm 777 -exec chmod 755 {} \;

Running this command will change the files back to 777: find . -perm 755 -exec chmod 777 {} \;


* http://httpd.apache.org/docs/suexec.html