What does the command 'chmod 755 script.sh' do?
- A.Deletes the file script.sh
- B.Changes the owner of script.sh
- C.Encrypts the file script.sh
- D.Sets full permissions for the owner and read/execute for group and others
Why D is correct
chmod changes file permissions. In octal notation, 7 = rwx (read+write+execute), 5 = r-x (read+execute). So 755 gives the owner full permissions (rwx), while group and others get read and execute but not write. This is a common permission set for executable scripts.
Know someone studying for Security Fundamentals? Send them this one.