Super User is a question and answer site for computer enthusiasts and power users. 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 restrict permissions to the content of a directory /abc/def/:

  • disable links (symbolic or hard)
  • limit the number of write permissions pointing to the same file (e.g. to 1, so only one process can write to the file simultaneously, many can read the file)

Is it possible? and how?

Maybe it is possible to create a special file system and mount it to the this /abc/def/ directory. But then how can I apply special restrictions for a custom file system?

share|improve this question
Apart from the face value of your question, what is the objective, why do you NEED this kind of behaviour, what are your trying to achieve? – tink Mar 25 '13 at 2:58
I have many instances of same process (in terms of unix: many processes of the same program :) and on request they can write in the file (with resume, if the process will be crashed). So if two processes receiving the same request - they starting to write in the same writing more then it should be there. – static Mar 25 '13 at 3:10

The Unix filesystems just aren't designed for this.

  • Disable links: A directory just contains links to the files, they have their separate life. Makes no sense.
  • Limit concurrent writers: Can be done by explicit locks. Again, no relation to directories at all.
share|improve this answer
so, no file system (not only pure unix) can offer this functionality? so I need to do it on my own? – static Mar 25 '13 at 3:22
On Unix, first point impossible (unless you create your own one-link-only filesystem; it would be entertaining finding out all the stuff that blows up in that environment), second point through explicit locks (mandatory locks, probably). – vonbrand Mar 25 '13 at 3:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .