change read write execute permission of a file linux

linux file permission ගැන දැන ගන්න - https://binurayeshan.blogspot.com/2019/10/understand-permission-of-file-in.html

හරි මම කියල දෙන්නම් දැන් කොහොමද linux file එකක permission වෙනස් කරන්නෙ කියල.
0_1569376605126_Screen Shot 2019-09-25 at 6.46.17 AM.png

මේ තියෙන්නෙ අපි හදා ගත්ත ෆයිල් එක sample.txt
එයාට default permission විදියට ඇවිල්ල තියෙන්නෙ
owner - read and write permission
member - read only permission
user - read only permission
මම දැන් owner,group,user ඔක්ටකොටම මේ file එක execute කරන්න පුලුවන් විදියට permission දෙනව
chmod +x sample.txt!
0_1569376655050_Screen Shot 2019-09-25 at 7.24.19 AM.png
දැන් ඔයා ඒ file එකේ permission බැලුවම ඔයාට පේනව් x කියල permission එක එයා​ලට හම්බුවෙලා තියෙනවා. ‍‍

හරි දැන් අපි group membersලට permission දෙමු
chmod g+w sample.txt # මේ කියන්නෙ group membersලට write permission දෙන්න කියල
0_1569376982177_Screen Shot 2019-09-25 at 7.31.30 AM.png
ඔයාලට බලාගන්න පුලුවන්න් group membersලගෙ permission වෙනස් වෙලා තියෙන විදි​ය

other usersලට permission දෙමු
chmod o+w sample.txt
0_1569377612870_Screen Shot 2019-09-25 at 7.43.20 AM.png

ownerට විතරක් permission දෙමු
chmod u+x sample.txt

මේ විදියට ඔයාලට කැමති විදියට ෆයිල් වල permission දෙන්න පුලුවන්
u — the user who owns the file (that is, the owner)
g — the group to which the user belongs
o — others (not the owner or the owner's group)
a — everyone or all (u, g, and o)
r — read access
w — write access
x — execute access



Comments

Post a Comment

Popular posts from this blog

Lets talk about bash script

Logical Operators in bash script(And, OR, NOT)