write without delete

  • kenperl

    kenperl - 2006-11-26

    how to set the permission bits that allow a normal user can write into the directory, but once the files are written into there, the file can't be deleted anymore.

    • Theodore Ts'o

      Theodore Ts'o - 2006-12-24

      There's no way to do this using Unix permissions.  

      If this is for an FTP server, there are ways you can configure the FTP server to not allow the delete command.

      If this is for users on a local system, probably your best is to write a setuid program that has the permissions to copy a file into a "drop box" directory.  Make sure of course that it is carefully written to make sure that it isn't overwriting an existing file, and the original user invoking the setuid program has read access to the file, AND that the file that is creating in the dropbox file is either under the setuid programs's control, or that the filename has been carefully checked so it doesn't contain '/' characters (or else someone could do something like ../../../../../etc/passwd with the predictable disastrous results on your system security).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks