On my machine there are user accounts. My question is how to restrict access to ones user files. Meaning no one else can access my files at all. How can I setup this restriction?How many root users are possible for one Linux machine?Edit:      I'm one of the user of my system with name TOM(actually my system has two users TOM and JERRY),I installed all the packages as root usingyum install <package name>Restriction:  No one else access my package and file which are containing in TOM user
How to restrict one user files to another user
permissions;files;users
You can't use yum command with regular user like TOM, Yum command just can be used by root power and if you have install a package with yum, every user can use it. But if you have tar package you can change installation directory like following: ( If that package generated with GNU auto tools)./configure --prefix=/home/myusername/binmake; make installand put /home/myusername/bin in your PATH variable. With this solution that package just run with myusername username!But if your file is a binary or txt file you just can set proper permission and if we look more precise and you want to write a program which works just with specific UID and USERNAME you can simply check UID variable because it's readonly and you can trust it. see below script and put it in a check.sh file: ( I wrote SHELLSCRIPT because here is Unix & Linux forum )#!/bin/bashCOUNTER=0FLAG=0declare -r MYUID=500declare -r USNAME=Sepahradfor i in `cut -d: -f3 /etc/passwd`do    COUNTER=$(( COUNTER + 1 ))    [ $i -eq $MYUID ] && TMP=$(head -n`echo $COUNTER` /etc/passwd | tail -n1 | cut -d: -f1) && [ $TMP == $USER ] && [ $MYUID -eq $UID ] &&  FLAG=1doneif [ $FLAG -eq 1 ]then    echo Hello $USNAME ($UID)elif [ $FLAG -eq 0 ]then    echo You don't have permission to see thi file $USER ($UID); exit 1fiThis script just runs for the user which has UID=500 and Sepahrad username. (You can change it by an editor) but if you don't want any user see your source even root you can compile it with shc command like: shc -v -r -T check.sh