I have a folder myfolder with lots of files and directories as follows:
-rwxrwx--x user1 user1 . -rwxrwx--x root root .. -rw-rw---- user1 user1 file1 -rw-rw---- user1 user1 file2 -rwxrwx--x user1 user1 dir1
I'd like to have a user: master who is able to remove all the files and folders. Be able to do:
rm -fr myfolder/*
Doing the following does not solve the problem:
chown user1:master myfolder
Because the user don't have write permissions in the subfolders. The subfolders are written by user1 randomly.
I can't change the permissions / owners of those files in a one time operation. If I do that user1 won't be able to create/edit files anymore.
What do you recommend?