/srv/irclogs.ubuntu.com/2013/08/26/#ubuntu-ca.txt

johanbrcjpcjp_: I'd recommend having it as a separate user (the user which your web server runs as)01:16
cjpcjp_which would be www-data in my case. However, it currently is set as such and yet I keep getting: Forbidden: You don't have permission to access / on this server01:19
cjpcjp_Somewhat baffled. Where else could permission to the root www folder be set?01:20
sigintcjpcjp_: Try:01:26
sigintstat /01:26
sigintAnd paste the first line of output that begins with 'Access:'01:26
cjpcjp_Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)01:27
cjpcjp_Access: 2013-08-24 22:13:20.365102236 -060001:27
cjpcjp_Modify: 2013-08-23 16:41:55.716656374 -060001:27
cjpcjp_Change: 2013-08-23 16:41:55.716656374 -0600 Birth: -01:28
cjpcjp_I've never seen 'stat /'01:28
sigintcjpcjp_: Do the same for /var/www01:30
cjpcjp_ah, I was being foolish, my bad. Brain is just jelly at this stage in the problem solving game :)01:31
cjpcjp_Access: (0755/drwxr-xr-x)  Uid: (   33/www-data)   Gid: (   33/www-data)01:31
cjpcjp_Access: 2013-08-25 16:51:21.113322560 -060001:31
cjpcjp_Modify: 2013-08-25 13:15:05.416354924 -060001:31
cjpcjp_Change: 2013-08-25 18:01:22.202833739 -0600 Birth: -01:31
cjpcjp_Uid = User ID Gid = Group ID01:31
cjpcjp_I get it now haha01:32
sigintWere you trying to access /var/www as www-data? If you weren't it'd cause problems01:32
cjpcjp_I made the unbelievable error of setting a sweeping permission to /var/www that gave it to the main user. After rebooting my server last night, everything went to the shits good sir and I've been trying to remedy it by setting to default01:35
cjpcjp_So I take it I should be able to access /var/www with www-data:www-data01:36
cjpcjp_Yet I am not01:36
sigintcjpcjp_: I bet if you did:01:38
sigintstat /var/www/*01:38
sigintyou'd see some strange permissions01:38
cjpcjp_I do indeed.01:41
cjpcjp_Hmm.. however the main folder that holds the site trying to be accessed is www-data:www-data01:42
cjpcjp_I would imagine all I need is /var/www and /var/www/webite to be www-data:www-data for it to be accessible remotely, no?01:43
sigintsudo chown -R www-data:www-data /var/www01:43
sigintsudo chmod -R 0755 /var/www01:44
sigintRun those two commands01:44
sigintthen try again01:44
sigintMaybe it's something weird other than that, buuut leave no stone unturned before you start tearing your hair out01:44
sigintIf you need the explanation, the first command will make /var/www and all its subfiles owned by www-data. The second will give www-data read/write/execute perms and will give anyone else just read and execute01:45
sigintIn fact that might not be the proper permission... I'm not sure if www-data would generally need write permissions and I'm not convinced that anyone else needs exec permissions... but it'd certainly work01:46
cjpcjp_true. curious, I am running ISPConfig and its permissions are set to another user, is it safe to say that I could reset those perms afterwards?01:46
sigintI'm not familiar with ISPConfig, just a moment01:46
cjpcjp_sudo chown -R ispconfig:ispconfig /var/www/ispconfig01:47
sigintThat would probably work fine, I think01:47
cjpcjp_I would love to be able to see the goup and user when I 'ls-l' command, however it just shows the user01:48
cjpcjp_let's give it a go!01:48
sigintYou may need to give ispconfig some additional permissions, but you can cross that bridge when you get to it01:49
sigintActually scratch that, it should be fine. although if you're running ispconfig it looks like you'll definitly need write perms for www-data01:50
cjpcjp_holy beans, it stills doesn't work!?01:50
sigintRuh-roh01:50
cjpcjp_I restarted apache2 as well01:50
sigintWhat is apache2 running as?01:51
cjpcjp_root01:51
cjpcjp_should be, right?01:51
sigintWell... no01:52
sigintIt should be running as www-data01:52
sigintThat is a problem. If you are running a legit server as root, you should fix that immediately01:52
cjpcjp_I'm curious sigint, this all started yesterday when I rebooted my server. First thing I noticed was that when finished booting, I started in a Login Shell instead of an Interactive one, I no longer begin in bash.01:52
cjpcjp_I'm wondering if there is any correlation? I don't believe so01:53
cjpcjp_oh really!01:53
cjpcjp_should it be user instead?01:53
cjpcjp_ok01:53
sigintsec, battery01:53
cjpcjp_would the commands be: sudo chown -R www-data:www-data /etc/apache2/*01:54
sigintNope01:54
cjpcjp_then: sudo chmod -R 0755 /etc/apache2/*01:54
sigintJust a second, I'll get back to you01:55
cjpcjp_thanks so much sigint, I really appreciate your help01:55
sigintCan you run this for me? ps -ef | grep apache01:59
sigintI may have been mistaken earlier01:59
sigintIt could also shed light on the problem01:59
cjpcjp_root      6340     1  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6344  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6370  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6371  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6372  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6373  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6374  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
cjpcjp_www-data  6400  6340  0 19:50 ?        00:00:00 /usr/sbin/apache2 -k start02:00
sigintOh okay, that looks fine. Forget the blather I said about root02:00
cjpcjp_avis      7284 20875  0 19:59 pts/10   00:00:00 grep --color=auto apachehaha! it's all good, process of elimination02:00
cjpcjp_hehaha! it's all good, process of elimination02:00
sigintOkay, well, all the permissions look good... just reiterate for me, what exactly are you trying to do that's causing this error?02:01
cjpcjp_I was trying to install graylog2 with Mongodb. Finished the installation taken from here:http://mrickert.com/2013/04/04/install-and-setup-graylog2-on-ubuntu-12-04/02:02
cjpcjp_Had to restart and the world fell a part02:02
cjpcjp_*apart02:03
cjpcjp_I've since turned off the service itself: graylog-server02:04
cjpcjp_I should note that once I attemoted to reboot, it hanged on Radicale service (a calendar service) which I have since removed from /sites-enabled and uninstalled02:05
sigintI see02:05
sigintSo you get an error while trying to install as per those instructions? At what step? And what exactly was the error?02:06
cjpcjp_no errors actually. whole thing ran perfectly02:06
cjpcjp_the only issues I felt that may have caused problems was* add graylog2 webserver by modifying the default site:02:06
cjpcjp_/etc/apache2/sites-available/default02:06
sigintI see... so what exactly is the problem? Are you unable to use the web interfae?02:07
cjpcjp_when I go to my server via browser pixel.uni.cx it doesn't load the index.html02:08
cjpcjp_at first it loaded my phpbb forums, now nothing, just good ol' fashioned forbidden /02:08
sigintOh, hahaha this isn't what I expected02:08
sigintI can't remember how to fix this off the top of my head, I'm not an apache expert. But I have encountered it before and I remember it being totally simple02:09
sigintGimme a minute or two02:09
sigint(if anyone DOES know off the top of their head, please chime in)02:09
cjpcjp_you're a blessing sigint! I've tried all I know with Googlefu, so a fresh mind is much appreciated02:10
sigintcjpcjp_: Can you pastebin your /etc/apache2/sites-available/default?02:16
cjpcjp_sure02:17
cjpcjp_http://pastebin.com/KJBSu3Uh02:17
sigintThanks02:18
cjpcjp_no thank you02:21
cjpcjp_see anything out of the ordinary?02:22
sigintI don't think so, but I'm researching02:22
sigintOh, can you do ls /etc/apache2/sites-available02:23
sigintand let me know what you see?02:24
cjpcjp_k02:28
cjpcjp_http://pastebin.com/duWna6me02:29
cjpcjp_apps.vhost belongs to owncloud service02:30
cjpcjp_forums is phpbb02:30
cjpcjp_munin is monitoring software that just doesn't like me :) and therefor, doesn't work02:30
cjpcjp_pastebin is my own pastebin02:30
cjpcjp_pcl.uni.cx is a url shortener02:31
cjpcjp_*pxl.uni.cx02:31
cjpcjp_and of course wiki is mediawiki02:31
sigintGeez that's a lot of stuff, haha02:32
sigintI can't lie, I'm clutching at straws here a little. So if you're losing interest or want to looks elsewhere, no need to consume your time. But if you'd lie me to keep trying, could you pastebin the files for your forum and for graylog2?02:32
cjpcjp_Any help you can provide, I am more than grateful sigint. If you're still willing, I will keep troubleshooting with you.02:34
sigintAlright, well, hit me :)02:34
cjpcjp_haha! awesome02:34
cjpcjp_k, one sec02:34
sigintI get something out of this too anyway. Learning is fun02:34
cjpcjp_should the default file not have as much stuff?02:35
cjpcjp_graylog2: http://pastebin.com/WY743xEp02:35
cjpcjp_indeed, no better way to learn than troubleshoot02:36
sigintWhoops, I think I may have found the problem02:36
sigintYour default looks normal, it matches mine exactly02:36
sigintbut,02:36
sigintOkay, let me take a step back actually02:37
cjpcjp_awesome!02:37
sigintWhen you load pixel.uni.cx, what are you expecting to see? Your forums?02:37
cjpcjp_I've since stopped the graylog2 server02:37
cjpcjp_no, my website. which is located in /var/www/pixel/index.html02:38
cjpcjp_it should be noted you can actually reach the forums via the subdomain: forums.pixel.uni.cx02:38
sigintHmm, right02:39
sigintWell, it looks like this graylog thing is overriding your document root, I think02:40
cjpcjp_AHA! son of a bitch graylog. hahaha02:40
cjpcjp_should I a2dissite graylog202:41
cjpcjp_and reboot?02:42
sigintYeeess... I think.02:43
sigintOne other short-term option02:43
sigintAhh, forget that actually02:43
sigintJust disable it02:43
cjpcjp_Site graylog2 disabled.02:43
cjpcjp_To activate the new configuration, you need to run: service apache2 reload02:43
cjpcjp_k, I've reloaded apache2 and now I get the forums directly from visiting pixel.uni.cx02:44
sigintExcellent, that wasn't that complicated02:45
cjpcjp_http://pixel.uni.cx/pixel/index.html02:45
cjpcjp_The requested URL /pixel/index.html was not found on this server.02:45
sigintHmm, is the file actually there? in /var/www/pixel02:45
cjpcjp_there is an index.html there, yes02:48
cjpcjp_this is the folder /var/www/pixel http://i.imgur.com/Cv9iDKt.png02:49
cjpcjp_I don't understand why it would ignore the index.html02:51
sigintNow that's odd02:52
sigint... no it's not actually, haha02:52
sigintI think I got it again02:52
sigintCan you show me /etc/apache2/sites-available/forums02:52
sigintplease?02:52
cjpcjp_yup02:53
cjpcjp_forums: http://pastebin.com/ZaxBsT1L02:54
cjpcjp_AllowOverride All02:55
cjpcjp_is that it! is that the culprit?02:55
cjpcjp_should it be AllowOverride None02:55
sigintI'm not completely sure what that does, but I can tell you that the file itself is the culprit02:55
sigintLine 6 overrides your document root again02:55
cjpcjp_really? shall we disable it for nwo?02:56
cjpcjp_*now?02:56
sigintYes02:57
sigintI'm not convinced that you actually need it, but try that02:57
DarwinSurvivorsigint: your "chmod -R" above will make everything executable in that directory (including files, images, etc). Not the safest was to run the web server...03:40
sigintYes, silly of me03:41
cjpcjp_the default host was not enabled04:19
cjpcjp_wrong chat04:19

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!