ohhh... good idea! thanks.
I would still want to empty out the Desktop directory every reboot. I'm wondering if the rm command would delete everything but the immutable file or just stop and error out. I'll have to test.

-MQ

On Tue, Jun 30, 2009 at 10:43 AM, Gilbert E. Detillieux <gedetil@cs.umanitoba.ca> wrote:
On 2009-06-30 09:22, Montana Quiring wrote:
I'm updating my public machine image with Ubuntu 8.04
I would like for the Desktop directory in the users home directory to be non-deletable but still allow the user to download files to that folder (the files in the Desktop folder get deleted on a reboot).
Right now my work around is a script in the runtime directory that deletes all of the files in the Desktop directory and then recreates and chowns it (in case it's been deleted).
Assigning the directory the immutable bit stops it from being deleted but also doesn't allow the user to write in that folder. :(

I tried all the google results I could find, but couldn't find a working solution.
Any suggestions?

How about putting an immutable file or subdirectory inside the Desktop directory?  Since the Desktop directory can never be emptied, it would then become non-deletable itself, but could still be writable.

--
Gilbert E. Detillieux           E-mail: <gedetil@cs.umanitoba.ca>
Dept. of Computer Science       Web:    http://www.cs.umanitoba.ca/~gedetil/
University of Manitoba          Phone:  (204)474-8161
Winnipeg MB CANADA  R3T 2N2     Fax:    (204)474-7609



--
-Montana
Blog:
http://montanaquiring.info
My Friend Feed:
http://friendfeed.com/antikx