For some special purpose, I want to prevent non-root users of the Linux Server from changing or renaming the filenames. However, they can modify and write to the contents of the file. How to do this from command line.
closed as off-topic by jasonwryan, Michael Kjörling, Anthon, slm♦, Patrick Oct 3 '13 at 12:40
This question appears to be off-topic. The users who voted to close gave this specific reason:
To rename a file, write permissions to the file don't matter, renaming a file is a change to the directory, not the file. That's changing the directory entry to have a different name pointing to the file.
So all you need to do is change the permissions of the directory. For instance:
That will prevent users from renaming files in there, but also from creating or deleting files. If you still want them to be able to do that, you could instead make the directory writeable but also set the