Monday, April 9, 2012

file and directory permission in linux

for file:

it has set uid, set gid and sticky bit
set uid: command will run as the owner
set gid: command will run ans the owner's group
stickey bit: keep the program in memory

for directory:

it has set gid and seticky bit
set gid: all file under the directory have the same gid as the directory
sticke bit: user can delete and modify files that he own or have write prifilege.


example
for /tmp
chmod 1777 /tmp


referecne: http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html'

No comments:

Post a Comment