Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm setting up ACL permissions in CENTOS.

I'm getting close to the structure that I have in mind however one piece is missing for completing the puzzle.

Is there any way to HIDE a file/directory from a specific user/group?

I'm not talking about not being able to read, change dir to it. I want to completely hide it from the specific user/group (not to show up on ls -la).

share|improve this question

2 Answers 2

up vote 1 down vote accepted

No there isn't a way of doing this. You can hide it from ls -l by having it start with a dot, but that's really not what you're asking. If you need users to not be aware of the existence of specific files or directories then you'll need to place them in a directory they don't have read permissions for.

share|improve this answer
    
Have to implement in through another layer then. The data will be accessible solely via proftpd I guess i'll have to play with the <Directory> directives there. –  Iraklis Mar 25 '10 at 16:50

If you rename a file to .[filename] , it won't be displayed by ls but will be displayed by ls -a
or
You can rename it to [filename]~ , Linux considers files ending in ~ as backup files and hence hides them.
or
Build your own ls utility to exclude some patterns from ever showing up in an ls
or
Try This: http://sourceforge.net/projects/ext2hide/
or

  1. You can put files in a directory and then "chmod 700 directory". Now only the owner of the directory can see the files. This is the closest thing to a correct answer to the question.

  2. Some people try screwball names. Inexperienced users often don't understand how to deal with such files. Names I have seen include naming a file a control character, ".. ", " ", etc.

  3. You can put files in a directory and then mount another filesystem on the directory. At this point special tricks are needed to see the files and only root will have the power to employ the tricks.

  4. A program can open a file and then unlink it. If that was the only link to the file, the file now has zero names. But it won't be deleted until the last program closes the file. Such a file can be called hidden. This happens a lot. A file system fills and someone finds an offending file. They rm it. Then they wonder why the space wasn't freed. I must see this once a week or so.

share|improve this answer
    
that doesn't help. Remember I need to hide the file/dir from a SPECIFIC user/group –  Iraklis Mar 25 '10 at 16:41
    
@marcel thanks alot for you input. I specifically said "ls -la" on my question to avoid the "." answers. I didnt know about ext2hide i'll have a look. –  Iraklis Mar 25 '10 at 16:51

Your Answer

 
discard

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.