You can have more control on mounting a file system like /home and /tmp partitions with some nifty options like noexec, nodev, and nosuid.
This can be setup in the /etc/fstab text file. The fstab file contains descriptive information about the various file systems mount options; each line addresses one file system. Details regarding to security options in the fstab text file are:
defaults: Allow everything quota, read-write, and suid on this partition.
noquota: Do not set users quotas on this partition.
nosuid: Do not set SUID/SGID access on this partition.
nodev: Do not set character or special devices access on this partition.
noexec: Do not set execution of any binaries on this partition.
quota: Allow users quotas on this partition.
ro: Allow read-only on this partition.
rw: Allow read-write on this partition.
suid: Allow SUID/SGID access on this partition.
For more information on options that you can set in this file fstab, see the man pages about mount(8).
Edit the fstab file vi /etc/fstab and change it depending on your needs.
For example:
/dev/sda11 /tmp ntfs defaults 1 2
/dev/sda6 /home vfat defaults 1 2
For our example above, the /dev/sda11 represent our /tmp directory partition on the system, and /dev/sda6 the /home directory partition. Of course this will be not the same for you, depending on how you have partitioned your hard disk and what kind of disks are installed on your system, IDE -hda, hdb, etc or SCSI -sda, sdb, etc.
Once you have made the necessary adjustments to the /etc/fstab file, it is time to make the Linux system aware about the modification.
This can be accomplished with the following commands:
[root@deep] /#mount -oremount /home/
[root@deep] /#mount -oremount /tmp/
Each file system that has been modified must be remounted with the command show above. In our example we have modified the /home/, and /tmp/ file system and it is for this reason that we remount these file system with the above commands.
On future booting the mounting will be automatic.
Hope this is what you were looking for.
Have phun….