[RndTbl] non-deletable directory but writable inside the directory

Gilbert E. Detillieux gedetil at cs.umanitoba.ca
Tue Jun 30 10:43:23 CDT 2009

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 at 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

More information about the Roundtable mailing list