Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2022 09:25:26 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-hackers@freebsd.org
Subject:   how to restrict file access below some top directory
Message-ID:  <YgTL9tf0EaX3%2BD3Q@pureos>

next in thread | raw e-mail | index | archive | help

Hello,

I want restrict in a C- or Perl-written application the file access to
only files below some top directory, say

	/var/spool/dir/

and not allowing, for example, access to /var/spool/dir/../../../etc/passwd
Ofc, this could be done easy with chroot(2), but this would require root
permision. Any other ideas?

	matthias
-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
"Wenn mich jemand fragt, woher ich komme, sag ich immer: aus dem netteren
Teil von Deutschland." Yvonne in "Die Kinder von Hoy" Grit Lemke, S.244 
"If someone asks me where I come from, I always say: from the nicer one
part of Germany." Yvonne in "Die Kinder von Hoy" Grit Lemke, page 244



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YgTL9tf0EaX3%2BD3Q>