ucphhpc / migrid-sync

MiGrid workspace where master branch is kept strictly in sync with SF upstream svn repo. Any development or experiments should use a branch. You probably want to fork your own clone or work e.g. on the edge branch if you wish to contribute.
GNU General Public License v2.0
3 stars 4 forks source link

Links pointing to the directory itself in wwwpublic #4

Open Bjarke42 opened 1 year ago

Bjarke42 commented 1 year ago

In the html area state/wwwpublic, there are links like public and letsencrypt that points to the directory itself.

example:

# ls -ld public
lrwxrwxrwx 1 mig mig 1 Jan 23 10:51 public -> .

It should not be necessary to have links that points to the directory itself. Any automation which has to do operations on the catalogue might encounter problems with such links, because they point to then selves and becomes a loop.

benibr commented 11 months ago

Are there any reasons why those links are needed? Not being able to do a recursive operation on the folder is quite annoying.

I guess it's only those two links that Bjarke mentioned:

[root@dstorweb01tl migrid_state]# find -L . > /dev/null
find: File system loop detected; './wwwpublic/letsencrypt' is part of the same file system loop as './wwwpublic'.
find: File system loop detected; './wwwpublic/public' is part of the same file system loop as './wwwpublic'.
jonasbardino commented 11 months ago

I'm pretty sure the letsencrypt link is used by LetsEncrypt looking for /letsencrypt/.well-known/XYZ files during HTTP-01 domain verification. Our security.txt on the other hand needs files to be inside /.well-known/ (e.g. https://erda.ku.dk/.well-known/security.txt) . It would probably be possible to restructure and eliminate the self-links, but I really can't find the time to do so and test it doesn't break things, sorry. Can't you just use find without the -L arg or with find -H TARGET ?