Showing posts with label permission files. Show all posts
Showing posts with label permission files. Show all posts

Sunday, October 14, 2012

آموزش خط فرمان-قسمت نهم

آیا تاکنون خواسته اید مشخصات ویژه ای را بر روی فایل های خود اعمال نمایید.در این قسمت می آموزید که چگونه بتوانید هنگام استفاده از یک فایل کاربردهای ویژه ای را نیز اجرا نمایید.




اعمال ویژگی ها بر روی فایل

دستور توضیح
# chattr +a file1 در این حالت , فایل تنها در حالت الحاقی ( اضافه شدن ) قابل تغییر می باشد   
# chattr +c file1 اجازه فشرده سازی و باز کردن خودکار یک فایل را به کرنل می‌دهد   
# chattr +d file1 در این حالت , در هنگام اجرای ابزار سیستمی dump برای گرفتن نسخه ی پشتیبان در پارتیشن های ext4 , از فایل مورد نظر نسخه ی پشتیبان تهیه نخواهد شد   
# chattr +i file1 با اجرای این دستور , فایل حتی توسط کاربر root غیر قابل تغییر می شود   
# chattr +s file1 اجازه‌ی امن بودن حذف یک فایل را می‌دهد   
# chattr +S file1 در این حالت , تغییرات در فایل همزمان بروی هارد دیسک ذخیره می شود   
# chattr +u file1 اجازه‌ي بازيابي محتوبيات بك فايل، حتي اگر كه cancel شده باشد   
# lsattr نمایش مشخصات ویژه یک فایل در یک پارتیشن با سیستم فایل ext4   

Sunday, September 16, 2012

Easy learn linux command line- Part 8

the set permission for files is subject for this learning serious. Do you know, what it is file permission? which permissiones are in linux file systems? you learn their in this Part


Permits on Files

Command Description
# chgrp group1 file1 change group of files   
# chmod ugo+rwx directory1 set permissions reading (r), write (w) and (x) access to users owner (u) group (g) and others (o)   
# chmod go-rwx directory1 remove permits reading (r), write (w) and (x) access to users group (g) and others (or   
# chmod u+s /bin/file1 set SUID bit on a binary file - the user that running that file gets same privileges as owner   
# chmod u-s /bin/file1 disable SUID bit on a binary file   
# chmod g+s /home/public set SGID bit on a directory - similar to SUID but for directory   
# chmod g-s /home/public disable SGID bit on a directory   
# chmod o+t /home/public set STIKY bit on a directory - allows files deletion only to legitimate owners   
# chmod o-t /home/public disable STIKY bit on a directory   
# chown user1 file1 change owner of a file   
# chown -R user1 directory1 change user owner of a directory and all the files and directories contained inside   
# chown user1:group1 file1 change user and group ownership of a file   
# find / -perm -u+s view all files on the system with SUID configured   
# ls -lh show permits on files   
# ls /tmp | pr -T5 -W$COLUMNS divide terminal into 5 columns   


source:linuxguide