The following folder has 777 permission however, it is owned by the root.

[root@cluster tmp]# ls -la
drwxrwxrwt   2 root          root           4096 Oct 16 21:53 .X11-unix/

So, a user can not delete his file (vnc lock) in that folder. How can I grant that for all user. Then they will be able to remove their vnc lock without root permission.


The issue you have here is the sticky bit (t) Since you are looking at a directory in this case, the sticky bit stops anyone but the owner of the directory from removing or renaming files within the directory.

To allow user to do what you require, you would need to remove the sticky bit from the folder attributes.

  • Yes, this is the answer. drwxrwxrwt in the output of ls -l indicates a directory with permissions of 1777, rather than 777. – Eliah Kagan Oct 17 '17 at 14:07
  • So, what is the command to drop the sticky bit? – mahmood Oct 17 '17 at 14:07
  • As root, you will need to chmod -t <directoryname> – Raman Sailopal Oct 17 '17 at 14:35
  • The sticky bit on a directory requires you to own a file to unlink it. Once you remove it any user will be able to delete any file in the directory, which may not be exactly what you were aiming for. – Matthew Gauthier Oct 17 '17 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.