code logs -> 2021 -> Fri, 30 Apr 2021< code.20210429.log - code.20210501.log >
--- Log opened Fri Apr 30 00:00:58 2021
00:02 Kindamoody is now known as Kindamoody[zZz]
01:19 Degi_ [Degi@Nightstar-smc.j8t.11.77.IP] has joined #code
01:21 Degi [Degi@Nightstar-78r.0ue.13.77.IP] has quit [Operation timed out]
01:21 Degi_ is now known as Degi
01:22 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
01:58 gnolam [lenin@Nightstar-ik80lk.priv.bahnhof.se] has quit [Connection closed]
01:58 gnolam [lenin@Nightstar-ik80lk.priv.bahnhof.se] has joined #code
01:58 mode/#code [+o gnolam] by ChanServ
05:46 KiMo|autorejoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
05:46 mode/#code [+o KiMo|autorejoin] by ChanServ
05:48 VirusJTG__ [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
05:48 Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
05:48 VirusJTG__ [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
06:59 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code
06:59 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
11:08 catalyst [catalyst@Nightstar-2m8p1m.dab.02.net] has joined #code
11:10 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
11:44 KiMo|autorejoin is now known as Kindamoody
12:22 catalyst [catalyst@Nightstar-2m8p1m.dab.02.net] has quit [Ping timeout: 121 seconds]
12:31 catalyst [catalyst@Nightstar-2m8p1m.dab.02.net] has joined #code
13:18 Kindamoody is now known as Kindamoody|afk
13:42 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
13:45 catalyst [catalyst@Nightstar-2m8p1m.dab.02.net] has quit [Ping timeout: 121 seconds]
14:35 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
14:36 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
14:40 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [The TLS connection was non-properly terminated.]
14:41 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
14:41 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
14:47 VirusJTG [VirusJTG@Nightstar-3mq.99q.104.208.IP] has joined #code
14:47 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
14:47 VirusJTG__ [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Ping timeout: 121 seconds]
14:58 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:58 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:42 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
16:42 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection reset by peer]
17:09 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
17:11 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
17:29 abudhabi__ [abudhabi@Nightstar-3ih6u6.adsl.tpnet.pl] has joined #code
17:31 abudhabi [abudhabi@Nightstar-7f4thd.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
17:32 abudhabi_ [abudhabi@Nightstar-7f4thd.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
17:32 abudhabi [abudhabi@Nightstar-3ih6u6.adsl.tpnet.pl] has joined #code
18:49 catalyst_ is now known as catalyst
18:52 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
18:52 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection reset by peer]
19:32 abudhabi__ [abudhabi@Nightstar-3ih6u6.adsl.tpnet.pl] has quit [[NS] Quit: Leaving]
20:49 Netsplit Golgafrincham.Nightstar.Net <-> Krikkit.Nightstar.Net quits: Degi, @VirusJTG, @Reiv, @PinkFreud
21:02 Netsplit over, joins: @Reiv, &VirusJTG, @PinkFreud, Degi
21:06
< abudhabi>
Anyone know how to use symlinks with lighttpd?
21:07
< abudhabi>
I'm trying to have a symlink in /var/www pointing to elsewhere (in my home directory). Trying to access it in the browser yields 403.
21:11
<&[R]>
Does the user lighthttpd runs as have access to your homedirectory (and the subdirectory)?
21:13
<&[R]>
You might be better off giving your user write access to a directory in /var/www/ and symlink from your home directory to the one in /var/www/
21:14 Kindamoody|afk is now known as Kindamoody
21:18
< abudhabi>
How do I check if it does have access?
21:19
<&[R]>
[rstamer@disc0 ~]$ sudo su - nobody
21:19
<&[R]>
-sh-5.1$ DIR=~rstamer/public_html; while test "$DIR" != /; do ls "$DIR" &>/dev/null && echo "G: $DIR" || echo "B: $DIR"; DIR="$(dirname $DIR)"; done
21:19
<&[R]>
B: /home/rstamer/public_html
21:19
<&[R]>
B: /home/rstamer
21:19
<&[R]>
G: /home
21:20
< abudhabi>
I want the stuff to actually be in the folder where it is, and not in /var/www, because it's in part of my syncthing setup. If I move it out of there, it won't be synced.
21:20
<&[R]>
Assuming `nobody` is the httpd user
21:20
<&[R]>
It's more likely `http`, `httpd`, or `www`
21:22
< abudhabi>
Hmmm. www-data?
21:23
< abudhabi>
Yes.
21:23
<&[R]>
It lists "G" for all the directories?
21:23
<&[R]>
Can you `cat` the file?
21:24
< abudhabi>
`sudo su - www-data` spits out 'This account is currently not available.'
21:25
<&[R]>
sudo -u nobody /bin/bash -l
21:25
<&[R]>
Try that instead
21:27
< abudhabi>
Hmm. It's telling me that '/.bash_profile: Permission denied' but succeeds in giving me a different prompt now, anyway.
21:28
< abudhabi>
I'm guessing this confirms lack of access.
21:28
<&[R]>
Nope
21:28
<&[R]>
That's unrelated
21:31
< abudhabi>
B: dirname: missing operand Try 'dirname --help' for more information.
21:31
< abudhabi>
I'm not sure I am running the command properly. Not sure where it even begins!
21:33
<&[R]>
Sorry, set the DIR= variable at the very start
21:33
<&[R]>
All it's doing is trying to ls $DIR, then it's parent, then it's parent, then it's parent etc until you reach /
21:33
< abudhabi>
OK, got it.
21:33
< abudhabi>
Got a lot of Bs and one G.
21:33
<&[R]>
B: means it can't list that directory, so that directory needs its permissions adjusted so www-data can read it
21:34
<&[R]>
G: means it /can/ list that directory
21:34
<&[R]>
You want to work with the last B: first, then check again
21:35
<&[R]>
Also you can setup a bind-mount instead of a symlink
21:35
<&[R]>
You'll want to put it in /etc/fstab so it survives reboots
21:38
< abudhabi>
Hmm. Would adding www-data to my normal user's group help?
21:38
<&[R]>
It could
21:38
<&[R]>
It also means that anyone that can run code as www-data can access the same parts of your home directory
21:40
< abudhabi>
What other alternatives do I have? chown the relevant subdirectory to www-data?
21:40
<&[R]>
bind-mount
21:41
< abudhabi>
OK, how does that work?
21:41
<&[R]>
Assuming /var/www/ad is a symlink to /home/ad/public_html -> `rm /var/www/ad` (remove the symlink) `mount -o bind /home/ad/public_html /var/www/ad`
21:42
<&[R]>
Then you need an fstab entry to make it permenant: /var/www/ad /home/ad/public_html none bind 0 0
21:44
<&[R]>
Err, I missed a step where you make /var/www/ad as a directory
21:44
<&[R]>
You need to do that before you try and mount to it
21:45 Netsplit Traal.Nightstar.Net <-> Krikkit.Nightstar.Net quits: Degi, @Reiv, @VirusJTG, @PinkFreud
21:48
< abudhabi>
It's still 403.
21:48
<&[R]>
Can you `ls /var/www/ad` as www-data?
21:49
< abudhabi>
Yes.
21:50
<&[R]>
Okay, can you cat the file you're trying to read?
21:50
<&[R]>
Again, as www-data
21:51
< abudhabi>
Yes.
21:51
<&[R]>
Is the server configuration pointing to /var/www/ad?
21:51
<&[R]>
Does ps list the lighttpd process as running as the www-data user?
21:53
< abudhabi>
server.document-root = "/var/www/html"
21:54
< abudhabi>
I can do run php files that are properly there.
21:55
< abudhabi>
I have /var/www/html/test.php and /var/www/html/test/test.php - and those two work. /var/www/html/doku/test.php does not.
21:55
<&[R]>
You can cat that one?
21:55
< abudhabi>
Ah, I cannot!
21:56
<&[R]>
There you go :)
21:57
<&[R]>
Might just be a perm issue on /var/www/html/doku
21:58
< abudhabi>
OK, gave it +rx and it works now. I suppose I'll have to give outgroup permissions to everything in there.
21:58
< abudhabi>
Anyway, thank you.
21:59
<&[R]>
No biggie
21:59
<&[R]>
I should write a blog and actually document this process
21:59
<&[R]>
Then I can just link people and explain things fully
22:04
< abudhabi>
Yes.
22:05
<&McMartin>
Yes
22:05
<&McMartin>
tech blogs are the greatest even when they're super sporadic
22:13 Netsplit over, joins: @Reiv, &VirusJTG, @PinkFreud, Degi
22:17
<&[R]>
abudhabi: did you have any lingering questions about the process I showed you?
22:25
< abudhabi>
No.
22:25
< abudhabi>
Managed to get things running afterwards.
23:05 Kindamoody is now known as Kindamoody[zZz]
23:14 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
23:24 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
--- Log closed Sat May 01 00:00:00 2021
code logs -> 2021 -> Fri, 30 Apr 2021< code.20210429.log - code.20210501.log >

[ Latest log file ]