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

John Lange john at johnlange.ca
Tue Jun 30 14:09:30 CDT 2009


On Tue, 2009-06-30 at 09:22 -0500, Montana Quiring wrote:
> Hello,
> 
> 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?

If home is not writable, then users can't delete their home directory
even if they own it.

e.g.

Permissions on /home:
drwxr-xr-x 5 root root 4096 2009-05-26 20:47 home/

Permissions inside /home:
drwxr-xr-x 90 johnlange users  4096 2009-06-30 13:56 johnlange/

I can not delete /home/johnlange

The permissions on the parent directory apply to the contents of that
directory.

-- 
John Lange
http://www.johnlange.ca



More information about the Roundtable mailing list