Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

For some special purpose, I want to prevent non-root users of the Linux Server from changing the filenames. However, they can modify and write to the contents of the file. How to do this from command line.

share|improve this question
Duplicate of…; please don't post on multiple sites simultaneously! – Ingo Karkat Oct 3 '13 at 8:49
Also, what is that "special purpose" (it might help getting better answers), and what have to found / tried?! – Ingo Karkat Oct 3 '13 at 8:51
Also cross posted at – David Foerster Oct 3 '13 at 9:12
up vote 2 down vote accepted

as root:

> mkdir -m 0755 testdir
> touch testdir/testfile
> chmod 0666 testdir/testfile

as guest:

> echo test > testdir/testfile
> mv testdir/testfile testdir/foobar
mv: cannot move `testdir/testfile' to `testdir/foobar': Permission denied

Works for me.

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.