بازگشت   پی سی سیتی > کامپیوتر اینترنت و شبکه Computer internet > سیستم عامل > لینوکس - linux

لینوکس - linux در این تالار مسائل مربوط به سیستم عامل قدرتمند لینوکس و هسته های مختلف آن , اخبار دانلود نرم افزارها و.... پرداخته میشود

پاسخ
 
ابزارهای موضوع نحوه نمایش
  #1  
قدیمی 02-28-2011
آموزش لینوکس AP آواتار ها
آموزش لینوکس AP آموزش لینوکس AP آنلاین نیست.
کاربر خودکار-مقالات لینوکس
 
تاریخ عضویت: Jan 2009
نوشته ها: 53
سپاسها: : 0

0 سپاس در 0 نوشته ایشان در یکماه اخیر
پیش فرض Change file permissions

CHANGE FILE PERMISSIONS
مقاله آموزشی لینوکس


Maybe, you find a file that's can't be deleted in Linux Operating system. In Linux, each of file has permissions/previleges for the owner, the group and the other.So no each one can open, modify or delete the file. Each file in linux has atribut, it will appears if you try to execute command that display a list of file in directory :




at the first column there are 10 character that's consist of :
1. first character is indicates type of file
- indicates that the type of the file is a regular file
d indicates that the type of the file is a directory
l indicates that the type of the file is a symbolic link
b indicates that the type of the file is a block special file
c indicates that the type of the file is a character special file
s indicates that the type of the file is a socket link

2. Three character after the first character is indicates the permission for user that owned the file (so based on the example above, the permission for user is read(r),write(w) and execute(x).

3. Three character after that is indicates the permission for group (so based on the example above, group don't have a permission for this file)

4. The last three character is indicates the permission for other(except user that owned the file and their group), so based on the example there is no permissions for other.

  • How to change the permissions ?
NOTE : WE CAN ADD OR REMOVE THE PERMISSION FOR A FILE FOR SPECIFIC USER OR GROUP OR OTHER IF WE JUST LOG IN AS SUPER USER (ROOT)

1. Based on the example above, we would like to change the permissions for the group for read(r), and execute(x) the file. To change the permission we use 'chmod' command (change modifications). For example :

fresh-IDEA Downloads# chmod g+rx 93197-gotchione.tar.gz

So the result will be like that :



2. The '+' character is used for add a permission for the file, but the '-' character is used for remove a permissions for the file. Form example we would like to remove the read(r) permission for the user that owned the file :

fresh-IDEA Downloads# chmod u-r 93197-gotchione.tar.gz

So the result will be like that :








Maybe, you find a file that's can't be deleted in Linux Operating system. In Linux, each of file has permissions/previleges for the owner, the group and the other.So no each one can open, modify or delete the file. Each file in linux has atribut, it will appears if you try to execute command that display a list of file in directory :




at the first column there are 10 character that's consist of :
1. first character is indicates type of file
- indicates that the type of the file is a regular file
d indicates that the type of the file is a directory
l indicates that the type of the file is a symbolic link
b indicates that the type of the file is a block special file
c indicates that the type of the file is a character special file
s indicates that the type of the file is a socket link

2. Three character after the first character is indicates the permission for user that owned the file (so based on the example above, the permission for user is read(r),write(w) and execute(x).

3. Three character after that is indicates the permission for group (so based on the example above, group don't have a permission for this file)

4. The last three character is indicates the permission for other(except user that owned the file and their group), so based on the example there is no permissions for other.

  • How to change the permissions ?
NOTE : WE CAN ADD OR REMOVE THE PERMISSION FOR A FILE FOR SPECIFIC USER OR GROUP OR OTHER IF WE JUST LOG IN AS SUPER USER (ROOT)

1. Based on the example above, we would like to change the permissions for the group for read(r), and execute(x) the file. To change the permission we use 'chmod' command (change modifications). For example :

fresh-IDEA Downloads# chmod g+rx 93197-gotchione.tar.gz

So the result will be like that :



2. The '+' character is used for add a permission for the file, but the '-' character is used for remove a permissions for the file. Form example we would like to remove the read(r) permission for the user that owned the file :

fresh-IDEA Downloads# chmod u-r 93197-gotchione.tar.gz

So the result will be like that :







پاسخ با نقل قول
پاسخ


کاربران در حال دیدن موضوع: 1 نفر (0 عضو و 1 مهمان)
 

مجوز های ارسال و ویرایش
شما نمیتوانید موضوع جدیدی ارسال کنید
شما امکان ارسال پاسخ را ندارید
شما نمیتوانید فایل پیوست در پست خود ضمیمه کنید
شما نمیتوانید پست های خود را ویرایش کنید

BB code is فعال
شکلک ها فعال است
کد [IMG] فعال است
اچ تی ام ال غیر فعال می باشد



اکنون ساعت 10:00 PM برپایه ساعت جهانی (GMT - گرینویچ) +3.5 می باشد.



Powered by vBulletin® Version 3.8.4 Copyright , Jelsoft Enterprices مدیریت توسط کورش نعلینی
استفاده از مطالب پی سی سیتی بدون ذکر منبع هم پیگرد قانونی ندارد!! (این دیگه به انصاف خودتونه !!)
(اگر مطلبی از شما در سایت ما بدون ذکر نامتان استفاده شده مارا خبر کنید تا آنرا اصلاح کنیم)


سایت دبیرستان وابسته به دانشگاه رازی کرمانشاه: کلیک کنید




  پیدا کردن مطالب قبلی سایت توسط گوگل برای جلوگیری از ارسال تکراری آنها