CandyRedTele / meatballs

0 stars 0 forks source link

Having problem with the log #53

Closed GeoffreyBoom closed 10 years ago

GeoffreyBoom commented 10 years ago

Same problem as before, I don't remember how we fixed it.

image

CandyRedTele commented 10 years ago

From the root of the project, can you run that and copy paste the output here?

ls -larth log rm -rf log bash src/create_log_dir.sh ls -larth

GeoffreyBoom commented 10 years ago

ls -larth log: total 8.0K drwxr-xr-x 10 root root 4.0K Aug 20 16:11 .. drwxrwxr-x 2 geoffrey daemon 4.0K Aug 20 16:21 .

sudo bash src/create_log_dir.sh [create_log_dir.sh] create log directory and setup permission...

ls -larth

total 432K -rw-r--r-- 1 root root 2.2K Aug 20 16:11 initDb.sh drwxr-xr-x 4 root root 4.0K Aug 20 16:11 .. drwxr-xr-x 4 root root 4.0K Aug 20 16:11 tests -rw-r--r-- 1 root root 966 Aug 20 16:11 README.md -rw-r--r-- 1 root root 117 Aug 20 16:11 .gitignore -rw-r--r-- 1 root root 369K Aug 20 16:11 github-git-cheat-sheet.pdf drwxr-xr-x 5 root root 4.0K Aug 20 16:11 dataGeneration -rwxr-xr-x 1 root root 1.8K Aug 20 16:11 runTest.sh -rw-r--r-- 1 root root 1.8K Aug 20 16:11 initDb.sh~ drwxr-xr-x 8 root root 4.0K Aug 20 16:11 .git drwxr-xr-x 2 root root 4.0K Aug 20 16:11 src drwxr-xr-x 3 root root 4.0K Aug 20 16:11 doc drwxr-xr-x 8 root root 4.0K Aug 20 16:11 website drwxr-xr-x 7 root root 4.0K Aug 20 16:14 sql drwxrwxr-x 2 root daemon 4.0K Aug 20 18:52 log drwxr-xr-x 10 root root 4.0K Aug 20 18:52 .

I had to sudo on rm -rf log and bash (etc)

CandyRedTele commented 10 years ago

refresh your page now

GeoffreyBoom commented 10 years ago

Same problem still.

CandyRedTele commented 10 years ago

Ok give me 1 minute

CandyRedTele commented 10 years ago

the output of this please ps aux | grep httpd

GeoffreyBoom commented 10 years ago

geoffrey 6183 0.0 0.0 5904 828 pts/1 S+ 18:58 0:00 grep --color=auto httpd

CandyRedTele commented 10 years ago

lamp is running?

GeoffreyBoom commented 10 years ago

I'll try restarting it.

CandyRedTele commented 10 years ago

Yes you should have more output from the previous cmd

CandyRedTele commented 10 years ago

Since you are using ubuntu I expect the following cmd to return daemon

ps aux | grep httpd | grep -vwhoami| grep -v root | head -n1 | awk '{print $1}'

Did you run initDb.sh earlier today? and was it working ?

GeoffreyBoom commented 10 years ago

All that did was print geoffrey.

CandyRedTele commented 10 years ago

oh I see all your files belong to root... but it seems that your server is running under your own username (which is surprising!)

GeoffreyBoom commented 10 years ago

Yeah, this isn't my working directory, I put it in the /var/www/html folder to test it out.

GeoffreyBoom commented 10 years ago

I could chown the directory to myself, would that help?

CandyRedTele commented 10 years ago

sudo chown -R geoffrey:geoffrey on the whole dir, then rerun rm -rf log && bash src/create_log_dir.sh ...

You should not use user root for your own files

GeoffreyBoom commented 10 years ago

the directory is now mine, the log folder is daemon's

The log folder is empty, is that normal?

GeoffreyBoom commented 10 years ago

probably time to give up for now and try again after exams.

CandyRedTele commented 10 years ago

it is normal that it is empty, you can't refresh?

If you still can't refresh we will do the same as last time : chmod o+w log (which just grant write permission to everyone... I don't like this solution though)

CandyRedTele commented 10 years ago

It is working on my 2 versions of ubuntu... are you in the right directory?

CandyRedTele commented 10 years ago

There is nothing to fix on my side, I'll close the issue... It is tested on 2 ubuntu, 2 windows and 2 macs... Just redo the steps carefully... I'll help you more another day

GeoffreyBoom commented 10 years ago

Alright, that's fine. I'll try some more later on. Thanks for the help.

CandyRedTele commented 10 years ago

No problem, if you can't make it Ill see you Friday to fix it with you. Jo