Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to force an application (like gedit) so that it can only save files in one specific folder (like ~/bla). Sort of like a prison where you can only save files.

I already thought about modifying gtk's source to force it, or using openroot.

share|improve this question

migrated from Apr 24 '11 at 20:05

This question came from our site for computer enthusiasts and power users.

There are two things you could do:

  1. Run gedit as a user that only has the ability to write to the one folder.
  2. Change the source code of gedit to reject saving to any other folder but the one you want and recompile it.
share|improve this answer
Actually 1 is a pretty good idea, thought of it before. – puckipedia Apr 24 '11 at 18:12

I haven't done this personally but I believe that you can accomplish this using SELinux.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.