Should I add the user www-data? Trying to get Rails off the ground
You can find the user that your webserver is using by executing ps aux | grep httpd
if httpd doesn't show any information, you can try using ps aux | grep apache
There should also be a user defined in your httpd.conf file.
One way to find this is egrep -iw --color=auto 'user|group' /path/to/httpd/conf
Related videos on Youtube
Adi
Updated on September 18, 2022Comments
-
Adi almost 2 years
I have the following tables
f_orders
ORDER_NUMBER NUMBER(5,0) ORDER_DATE DATE ORDER_TOTAL NUMBER(8,2) CUST_ID NUMBER(5,0) STAFF_ID NUMBER(5,0)
with the following data
ORDER_NUMBER ORDER_DATE ORDER_TOTAL CUST_ID STAFF_ID 5678 10-Dec-2017 103.02 123 12 9999 10-Dec-2017 10 456 19 9997 09-Dec-2017 3 123 19 9989 10-Dec-2016 3 123 19
and
f_customers
ID NUMBER(5,0) FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(35) ADDRESS VARCHAR2(50)
with the following data
ID FIRST_NAME LAST_NAME ADDRESS 123 Cole Bee 123 Main Street 456 Zoe Twee 1009 Oliver Avenue
I'm supposed to display the name of the customer wthi the most orders placed in the year 2017.
My query looks like this
SELECT f_customers.first_name, f_customers.last_name, count(order_total) FROM f_orders JOIN f_customers ON f_customers.id = f_orders.CUST_ID WHERE TO_CHAR(order_date, 'DD-Mon-YYYY') LIKE '%2017' GROUP BY f_customers.first_name, f_customers.last_name HAVING count(order_total) = (SELECT max(count(cust_id)) FROM f_orders GROUP BY cust_id)
The problem is that whenever I insert the where statement it returns
no data found
, even though it should return the name Cole Bee with 2 orders If I remove the where statement it will show that Cole Bee has placed 3 ordersI can't figure out why I get the
no data found
result. Any ideas? -
JellicleCat over 11 yearsI get the same message for httpd:
chown: invalid user: `httpd:httpd'
. -
Lucas Kauffman over 11 yearsLike I said it depends on your webserver, operating system and configuration. What webserver are you running?
-
JellicleCat over 11 yearsApache + Phusion Passenger. (I looked in http-manual.conf for a clue as to the user name, but don't see anything that looks like a user name.)
-
Lucas Kauffman over 11 yearscheck what user your Apache is using by using
ps aux|grep -i 'apache'
-
Lucas Kauffman over 11 yearsTry to see if the user apache exists
-
JellicleCat over 11 yearsOkay.
daemon
shows up in the first column for all the results except the first, which readsroot
. Is daemon the owner? -
JellicleCat over 11 yearsThere is a user named apache in my /etc/passwd file, but what shows up when I grep ps is
root
anddaemon
.