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

Consider this command: sudo incrontab ~/incron-config where ~/incron-config contains:

/home/zetah/Documents/incoming IN_CREATE,IN_MOVED_TO /home/zetah/scripts/ $@/$#

and consists of:

#! /bin/bash

python /home/zetah/scripts/ "$1"

Python script accesses some online services and produces 3 new files. They are owned by root.
Why is that and how can I change this behavior. I want to be the owner of those product files


share|improve this question
up vote 0 down vote accepted

By running incrontab under sudo, you are updating root's configuration. Therefore, your script is also run as root.

If you run incrontab without sudo, your script should be run under your own user account.

share|improve this answer
Thanks. I thought that running with sudo is the only way there is – zetah Sep 5 '11 at 7:22

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.