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?
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.
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/http://www.cs.umanitoba.ca/%7Egedetil/ University of Manitoba Phone: (204)474-8161 Winnipeg MB CANADA R3T 2N2 Fax: (204)474-7609
On 2009-06-30 10:46, Montana Quiring wrote:
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.
"rm -f" should do the trick, since it will ignore errors and continue.
ya! It works like a charm. I made the immutable file a '.' (hidden) file so that it doesn't even show up in ROX. Thanks for your help Gilbert. -MQ
On Tue, Jun 30, 2009 at 10:53 AM, Gilbert E. Detillieux < gedetil@cs.umanitoba.ca> wrote:
On 2009-06-30 10:46, Montana Quiring wrote:
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.
"rm -f" should do the trick, since it will ignore errors and continue.
-- Gilbert E. Detillieux E-mail: gedetil@cs.umanitoba.ca Dept. of Computer Science Web: http://www.cs.umanitoba.ca/~gedetil/http://www.cs.umanitoba.ca/%7Egedetil/ University of Manitoba Phone: (204)474-8161 Winnipeg MB CANADA R3T 2N2 Fax: (204)474-7609
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.