How do you change File Access Permissions? 1. Every file has following attributes: 2. owner's user ID ( 16 bit integer ) 3. owner's group ID ( 16 bit integer ) File access mode word (r w x) - (r w x) - (r w x) (user permission) - (group permission) - (others permission) To change the access mode, we use chmod(filename,mode). Example 1: To change mode of myfile to 'rw-rw-r--' (ie. read, write permission for user - read,write permission for group - only read permission for others) we give the args as: chmod(myfile,0664) . Each operation is represented by discrete values 'r' is 4 'w' is 2 'x' is 1 Therefore, for 'rw' the value is 6(4 2). Example 2: To change mode of myfile to 'rwxr--r--' we give the args as: chmod(myfile,0744). - Study24x7
Social learning Network
16 Feb 2023 02:32 PM study24x7 study24x7

How do you change File Access Permissions? 1. Every file has following attributes: 2. owner's user ID ( 16 bit integer ) 3. owner's group ID ( 16 bit integer ) File access mode word (r w x) - (r w x) - (r w x) (user permission) - (group permission) - (others permission) To chang...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles