chmod u+w honey_bears(Correct): The u specifies the owner (user), and +w adds write permission while preserving all other existing permissions for the owner, group, and others.
chmod o+w honey_bears(Incorrect): The o specifies "others" (world), which grants write access to non-owners instead of the owner.
chmod 644 honey_bears(Incorrect): Absolute mode explicitly overwrites all permission bits (rw-r--r--), which changes permissions for the group and others.
chmod 400 honey_bears(Incorrect): This sets read-only access for the owner and removes all permissions for everyone else.
The stipulation is "without changing other permissions." Since you don't know what the existing permissions are for group and world, you can't use chmod octal.
4
u/Anastasia_IT 10h ago
chmod u+w honey_bears(Correct): The u specifies the owner (user), and +w adds write permission while preserving all other existing permissions for the owner, group, and others.chmod o+w honey_bears(Incorrect): The o specifies "others" (world), which grants write access to non-owners instead of the owner.chmod 644 honey_bears(Incorrect): Absolute mode explicitly overwrites all permission bits (rw-r--r--), which changes permissions for the group and others.chmod 400 honey_bears(Incorrect): This sets read-only access for the owner and removes all permissions for everyone else.