An administrator is unable to rename a file due to restricte - CompTIA Linux + XK0-005

Question

An administrator is unable to rename a file due to restricted permissions.
Which command should the administrator run next to allow any user to rename the file?

Answers
  1. correct
Explanation

The Correct Answer is: D. chmod -t files
The sticky bit (set using the +t option) on a directory restricts file deletion or renaming within that directory to only the file's owner or the root user, even if other users have write permissions on the directory. To allow any user with write access to rename or delete files, the administrator can remove the sticky bit using chmod -t.

Why the other options are incorrect:

  • A. chgrp reet files
    This changes the group ownership of the file to reet, but it does not affect permissions directly related to renaming. Unless users belong to the new group and the group has proper write access, this won’t resolve the issue.

  • B. chacl -R 644 files
    This appears to be a misused or invalid command. chacl is used for setting access control lists (ACLs) on some systems, but 644 is a numeric permission, not an ACL format. Also, setting permissions to 644 still doesn’t guarantee rename permission if the sticky bit is enabled on the directory.

  • C. chown users files
    This changes the owner of the file to the users user or group, depending on the system setup. It may affect who can modify the file, but it does not remove the sticky bit restriction that prevents file renaming within the directory.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered