How can I set folder permissions in linux in such a way that users can create files/folders, but not delete?

I have made a folder on my linux server, which needs to function as some sort of "deposit box".

Users should be able to create files & folders, but not delete them after they have been created.
Is that possible from a linux command line?

You’d probably have to mess with umask and chmod.
umask [-p] [-S] [mode]
The user file-creation mask is set to mode. If mode begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a symbolic mode mask similar to that accepted by chmod(1). If mode is omitted, the current value of the mask is printed. The -S option causes the mask to be printed in symbolic form; the default output is an octal number. If the -p option is supplied, and mode is omitted, the output is in a form that may be reused as input. The return status is 0 if the mode was successfully changed or if no mode argument was supplied, and false otherwise.

One Response to “How can I set folder permissions in linux in such a way that users can create files/folders, but not delete?”

  1. rootlinuxusr Says:

    You’d probably have to mess with umask and chmod.
    umask [-p] [-S] [mode]
    The user file-creation mask is set to mode. If mode begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a symbolic mode mask similar to that accepted by chmod(1). If mode is omitted, the current value of the mask is printed. The -S option causes the mask to be printed in symbolic form; the default output is an octal number. If the -p option is supplied, and mode is omitted, the output is in a form that may be reused as input. The return status is 0 if the mode was successfully changed or if no mode argument was supplied, and false otherwise.
    References :
    http://linuxmanpages.com/man1/umask.1.php

Leave a Reply