You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/09/19 11:58:51 UTC

DO NOT REPLY [Bug 40538] New: - system('ls') called in cgi retuns -1 when run through browser

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40538>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40538

           Summary: system('ls') called in cgi retuns -1 when run through
                    browser
           Product: Apache httpd-2
           Version: 2.0.52
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: gmachkure@gmail.com


i have a cgi script which calls system('ls') and system('a c executable') .
when it is run on the command line,works fine.but when it is run through web 
browser returns -1 permission denied.

i checked the permission, its 0755 for ls.and for c executable also its 0755
with root as user and root as owner.
while system('pwd') works fine through the browser also.

i think it is because of selinux.

so i added
chcon -R system_u:object_r:httpd_sys_script_exec_t <path to the c executable dir>.

say c execuable is license. 

Now it works through the browser.but when i run the executable(license) through
command line i get next shell not any output.


os : FC-3 
apache 2.0.52.
selinux enabled.

so how do make it work?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40538] - system('ls') called in cgi retuns -1 when run through browser

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40538>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40538


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From jorton@redhat.com  2006-09-19 12:25 -------
Issues with SELinux in Fedora should be discussed on
fedora-selinux-list@redhat.com, please don't file bugs at the ASF for such issues.

This is expected behaviour for an SELinux system; when the script runs in the
httpd_t context it does not have access to terminal devices, so you see no
output on the terminal.

("setsebool httpd_tty_comm 1" allows such access)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org