Relocate directories (e.g. tmp): how?

Daniel J Walsh dwalsh at redhat.com
Wed Feb 20 13:19:29 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

S P Arif Sahari Wibowo wrote:
> On Mon, 18 Feb 2008, Chris Adams wrote:
>> I hit this too; my solution was to bind mount /tmp onto /var/tmp.  My
>> /etc/fstab has:
>> /tmp    /var/tmp    none    bind
> 
> Thanks! I was thinking about this before but somehow my fstab
> configuration was incorrect. I copy yours and now it works nicely.
> 
> That said, I still interested in "SELinux solution". This one seems to
> be a work-around and SELinux may actually block it in the future.
> 
> Furthermore, there is a small inconvenience that if I boot from rescue
> CD, the tmp directory probably won't be mounted.
>
You can set up alternate labeling on directories using semanage fcontext

# semanage fcontext -a -t tmp_t '/mytmp(/.*)?'



> 
> ------------------------------------------------------------------------
> 
> --
> fedora-selinux-list mailing list
> fedora-selinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-selinux-list

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAke8KOEACgkQrlYvE4MpobP11gCgs7wJUGhsYuZJjJUByQ4MYfaJ
dukAmwU9uPq140jWVW/vTe9jBtIxETTc
=RWCe
-----END PGP SIGNATURE-----




More information about the fedora-selinux-list mailing list