Hacker News new | ask | show | jobs
by colejohnson66 1236 days ago
Interestingly, at 39 levels deep[0], you can keep going. However, if you go to 40 levels deep[1], the link to `ubuntu` just disappears. Manually appending it to the URL to get to 41 levels deep[2] gives a 403 Forbidden response.

As for why, does anyone know? Because at 39 levels, you're well past an obvious folder path limit of 256 characters. Specifically, at 39 levels, the path portion of the URL is 273 characters (299 total). At 40 levels, it's 280 characters long (306 total). It doesn't seem like a character limit because you can still access the other folders/files from 40 levels deep.

[0]: http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/ubuntu/ubuntu...

[1]: http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/ubuntu/ubuntu...

[2]: http://archive.ubuntu.com/ubuntu/ubuntu/ubuntu/ubuntu/ubuntu...

1 comments

Seems like it's the Linux limitation[1][2]. Testing it myself, I made a directory "/home/bla/a", and inside this directory, a symlink that refers to "../a".

After 41 invocations of "cd a", doing another "cd a" takes me to the root directory (so /home/bla/a).

Perhaps when the web server tries to follow the 41st symlink the system says "You've recursed to much, go to /some/path/not/accessible/to/the/http/user" and that's why it returns a 403.

And the directory (well, symlink) isn't listed at depth 40 because the server knows following it will lead to a 403.

[1] https://lwn.net/Articles/650786/#:~:text=Linux%20imposes%20a....

[2] https://unix.stackexchange.com/questions/79571/symbolic-link...