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 වෙනස් කරන්නෙ කියල.

හරි මම කියල දෙන්නම් දැන් කොහොමද linux file එකක permission වෙනස් කරන්නෙ කියල.

මේ තියෙන්නෙ අපි හදා ගත්ත ෆයිල් එක sample.txt
එයාට default permission විදියට ඇවිල්ල තියෙන්නෙ
owner - read and write permission
member - read only permission
user - read only permission
එයාට 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!

දැන් ඔයා ඒ file එකේ permission බැලුවම ඔයාට පේනව් x කියල permission එක එයාලට හම්බුවෙලා තියෙනවා.
හරි දැන් අපි group membersලට permission දෙමු
chmod g+w sample.txt # මේ කියන්නෙ group membersලට write permission දෙන්න කියල

ඔයාලට බලාගන්න පුලුවන්න් group membersලගෙ permission වෙනස් වෙලා තියෙන විදිය
other usersලට permission දෙමු
chmod o+w sample.txt

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)
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
w — write access
x — execute access
worth it! keep going..
ReplyDelete