Saturday, February 12, 2011

User Permissions

1.syntax: useradd username
eg: useradd bharat

2.syntax:ls -ld dirname
eg:ls -ld success

File permissions:

10 different attributes;
1-directory/file/link
2,3&4 - root permissions
5,6&7 - group permissions
8,9&10 - other permissions

permissions in terms of numbers:
4-read
2-write
1-execute

Example:
#chmod 766 success/
#chmod 777 success/
#chgrp -R bharat success
drwxrwxrwx 3 root bharat 4096 Feb 12 22:02 success/
#chown -R bharat success/
drwxrwxrwx 3 bharat bharat 4096 Feb 12 22:02 success/
#chmod u+x success/ - change mode as executable

0 Comments: