![]() |
netinfo question
Prompted by today's mobile user hint I opened netinfo utility for the first time and noticed, among the various and sundry "users" two that are especially puzzling: name: "unknown", real name: "Unknown User" and name: "nobody", real name: "Unprivileged User". Would someone be good enough to explain what these are? Appreciate and thank.
|
Unix Heritage
Mac OS X has these accounts because services are often run using such an account for security reasons.
For example, let's take a look at the user "nobody." Code:
$ finger nobodyNow, the system uses the nobody user to run some processes. Here's an example on my system: Code:
$ ps aux | grep nobody |
Thanks jdera. I wasn't always suspicious but there just seems to be a lot of unfriendly things happening lately. Tell the rest of your MA friends that today is not one for washing outdoor windows. e
|
Hey I have a question about the the /usr/bin/false for the user www
I'm trying to get .pl and .cgi files to be processed by perl. But I can't figure out why I never have permission to run the files. I've chmodded them and everything. The Chmod u-x or whatever it was was the closest thing for me that worked... But I'm still getting permissiono errors... Apache is running on user www, and I was wondering if its not able to access the shell for some reason to process perl.... The only perl stuff that actually works is awstats and I have no clue how that works unless it using root somehow. |
Does anyone even know?
|
For perl scripts to run they need to be world executable, ie user RWX, group R-X and other R-X so you need chmod +x script.pl for it to work.
|
Quote:
[Wed Aug 11 23:41:34 2004] [error] [client 192.168.1.1] Premature end of script headers: /WebSTAR Server Suite 4.3/cgi-bin/test copy.pl Even a Blank .pl file wont work. |
Sorry, didn't realise you were using WebStar rather than Apache. Either way, I don't think it's a shell permissions issue getting an error like that, more likely a problem with the script itself.
Does the default script you copied have a reference to itself anywhere that would break if you change its name? What happens when you run the script from the command line? Code:
perl /WebSTAR\ Server\ Suite\ 4.3/cgi-bin/test\ copy.pl |
Quote:
|
Quote:
I've tried plenty of scripts.... None of them work with Apache.. But all of them work with perl via the terminal..... The only file that I have that actually executes is awstats.pl.... Also I've tried copying the source code from that file to another file which does not work. And they both have the same permissions. But I keep getting Error 500. Also when I load the page.. Perl doesn't even show up in the process list. I can't figure this out. :confused: |
In that case, have you changed your httpd.conf file to give execCGI on the webstar folder, or have you changed the scriptalias to point to it for cgi-bin?
|
Here check out my .conf file.
Click here to view my config file. I'm, looking at someone else's conf file at the moment... They don't even use the CGI stuff in the their file and it runs somehow.... Maybe it has something to do with the Modules or something.. I'm still looking.. I'm looking up mod_headers... But I don't know if that has anything to do with cgi since their is only 1 file (from awstats installation) I can get to work.... I have no idea how that script works, yet I can't copy the code to another file without it not working... Anyways it has gotta be with this httpd.conf file.. I've tried just about everything apache said to do. |
Your httpd.conf looks fine so I'm guessing it's a problem with the script itself.
How about trying a simple script like Code:
#!/usr/bin/perl |
Code:
Internal Server ErrorThe error logs says this... (don't mind the first 2.. i was looking at the man and it said +X but that didn't work so -X then +x it.) Code:
[Sun Aug 15 12:17:40 2004] [error] [client 192.168.1.1] file permissions deny server execution: /WebSTAR Server Suite 4.3/cgi-bin/helloworld.pl |
what does
Code:
which perl |
Code:
jpowermac-g4s-Computer:/Users/powermac root# perl -vCode:
jpowermac-g4s-Computer:/Users/powermac root# perl -V |
Jeez still waiting for help on this one.
|
Looking back at the error log you posted, I see some "no such file or directory" errors. You need to check that those files actually exist under the path mentioned. I suspect they don't.
|
That's the thing though.... they are there...I would get a 404 error if they wasn't.
|
Please show us the content of the file helloworld.cgi
|
Here is the contents.
Code:
#!/usr/bin/perlAlso but this file doesn't even do anything in the terminal Code:
[jpowermac-g4s-Computer:~] powermac% perl /WebSTAR\ Server\ Suite\ 4.3/cgi-bin/helloworld.cgi Code:
[jpowermac-g4s-Computer:~] powermac% perl /WebSTAR\ Server\ Suite\ 4.3/cgi-bin/perl_test.pl Code:
Internal Server ErrorCode:
[Tue Aug 24 15:50:22 2004] [error] (2)No such file or directory: exec of /WebSTAR Server Suite 4.3/cgi-bin/perl_test.pl failedCode:
192.168.1.1 - - [24/Aug/2004:15:50:22 -0400] "GET /cgi-bin/perl_test.pl HTTP/1.1" 500 619 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" |
Quote:
I think your script files have "Macintosh" line endings instead of "Unix" line endings. This can happen if you choose the wrong editor to create your scripts. Which text editor have you been using? To fix things, open the file in an editor that is able to handle a variety of line-endings and re-save it with Unix line endings. One such editor is BBedit Lite. Another is SubEthaEdit. If you open your current script files in 'pico' (in the Terminal, type: pico helloworld.cgi) you should see that the lines are screwed up. |
Hi,
I've just had a quick read of this thread and my first thought was to wonder if the CGI handler in the web server is barfing at the spaces in the directory you are using. Does the awstats script you mention live in the same directory? I'd recommend against having your CGI directory under your DocumentRoot, BTW. It's a major security concern. Tony |
OK, I've had a better look at your Apache config.
My suggestion would be to move your CGI files to /Library/WebServer/CGI-Executables and change the script alias back to the default of this directory. Given your current setup this has three advantages. 1/ It gets rid of the suspect spaces in the path. Note that the awstats script that you say is working lives in a directory with no spaces in its path. 2/ It moves your CGI directory out from under your DocumentRoot 3/ It removes the possibility that the problem is the way you are script aliasing a directory back to itself. At the moment the real URL of your CGI directory is exactly the same as the one you are applying via the scriptalias command - making it a waste of time and perhaps a source of error inside Apache. Oh, and while you are at it - have a serious think about moving your DocumentRoot to a path that doesn't have spaces. It is almost certain to cause you problems further down the track. Tony |
Awww just when I though you were onto something andt it was going to work.. still doesn't work
Code:
[Wed Aug 25 00:21:48 2004] [notice] Apache/1.3.29 (Darwin) PHP/4.3.2 mod_perl/1.26 configured -- resuming normal operationsand also.. awstats.pl works in my older directory (no aliases) with space.... but nothing else works.... not even copying that data into another file, or modifying the awstats file. |
Hmmmm.
OK. Try fixing the line ends - that should improve things. Then check where perl is installed : ls -l /usr/bin/perl should give you a result -rwxr-xr-x 1 root wheel 19944 28 May 08:53 /usr/bin/perl and just in case make sure that the line <Directory "/Library/WebServer/CGI-Executables"> says exactly that with no trailing slash. Also, to be totally on the safe side, turn off mod_perl by commenting out both the LoadModule and AddModule lines that mention it. Then tell us what happened. Tony |
Code:
[jpowermac-g4s-Computer:~] powermac% ls -l /usr/bin/perlI did not comment out the cgi-script .cgi .pl line since that doesn't use perl I don't think... and when I used the commented line below it.. perl-script .cgi .pl it just prints out the text of the file.... Not sure how ASP makes use of perl. But yeah.. the problem has to do with something with cgi-script. |
Please check the line-endings in your script files as I suggested a few posts back. The fact that your Perl script didn't work from the command-line strongly suggests that this is the problem.
|
it still doesn't work.. plus test.pl executes from terminal.. but it doesn't work in browser... still error 500..... jeez... It's never gonna work... it seems to choke on the cgi-script handler.... Also... With WebSTAR V.. I get errors with cgi files also (not sure which since no errors folder exists.. most likely 500 still.... and it has its own cgi plug-in. :( :confused: :eek: :mad:
|
Anyone know?
|
| All times are GMT -5. The time now is 02:26 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.