المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : لينكس استفسار بسيط عن ال umask



fanar
14-10-2003, 09:46 AM
السلام عليكم...

كما هو معلوم لديكم ان القيمة الافتراضية لل umask في الردهات هي 0002 وللرووت 0022


عند انشاء ملف جديد لاي مستخدم غير الرووت فإن الصلاحيات تكون 664 للفايل .... 775للدايركتوري...

عند انشاء اي ملف عن طريق الرووت تكون الصلاحيات 644 للفايل ... 755 للدايركتوري...

سؤالي هو... كيف تتم هذه العملية حسابيا ....؟؟؟؟ يعني لو كنت اريد تغيير قيمة ال umask !!!!

مـسـك
14-10-2003, 02:55 PM
http://www.scrye.com/~kevin/lsh/feb-02/Security-HOWTO-5.html#umask

http://www.washington.edu/computing/unix/permissions.html



A variable called `umask' is used as a permission mask for all newly created files and directories. Umask is a 3 digit octal number. The default umask is 022 = 010 010 000 binary. The two one bits prevent "group" and "other" write permission. So, a newly created file will have rwx permission for the owner, and rx permission for group and others. A umask of 077 = 111 111 000 would cause new files to have no permissions set for group and others. In order to use a umask other than the default, you should include the line `umask num' (where num is an octal number) in your .cshrc file. For more about umask, enter

man umask

ErrorMsg
14-10-2003, 03:46 PM
ياسيدي العزيز
umask تعني NAND وبكلمات أخرى NOT AND
مثلا umask=022
يعني تحضر022 بالنظام الثماني تصبح 755
ثم تعمل عليها و للنظام الحالي 777 فتصبح 755
----
ملاحظة لتحديد ال umask هناك طريقتين
الأولى
fstab
والثانية
profile
لأدري هل كتبت هذا أم لا في الدروس ولكن ربما لو تضلع عليها بسرعة
www.koolpages.com/jornix/ar/lessons.html