How to delete other's folders which are in our own folder?

Hi All,

I need a solution for the following scenario.

I am the owner for the particular folder and I have given 777 permissions for some specific reasons. So others can able to create folders and files.

But when I am done with the work, I need to delete the folders which are created by others. I was not able to delete their folders since they did not give read permission.

Is there any way to delete their folders ??

Unless you have root access, you are doomed... Big mistake to set a directory 777 if you want to clean after, being owner permits you to remove whatever is there except if you have subdirectories created there that are not empty and you are not owner( content of the subdirs...)...

You have no other choice if not root but to ask your folk to come and cleanup...

If you don't have permissions, get them. See chmod and sudo.

777 is not the magic sledgehammer to solve all permissions problems.

Thank you for your replies, If I use any sticky bytes in my folder, Can I able to delete other's folders in my folder.

Could you please throw a light on this.

If you set it group-sticky, that will set the group of newly-created folders, which depending on what group you're in and what group permissions the folders have, will allow you to delete files inside.

It will not do anything to folders that already exist.

The other sticky bit has a different function, restricting delete permissions even further.