Hide files with permissions?
Hey guys, here's what I would like to happen -- not sure if it can be done though. I want people who have no business with a file to not even see it exists.
Let's say we have a file called foo.txt foo.txt belongs to cooluser:coolgroup and has permissions 750 As it is, if a user named 'tux' comes along (and does not belong to coolgroup) tux cannot view/modify/delete/execute/anything the file... but tux can still see it's there. Is there any way to set files to be hidden from certain users based on their permissions or otherwise? Even if this can not ever be done I'd like to know that. -Bill |
If you take away permissions for the directory containing the file they won't be able to see the file exists. I don't think you can do anything more than what you have done to the file though.
|
I believe the only way to hide a file is to keep them out of the directory the file is in. Take away r and x permissions on the directory. w permissions is meaningless without x.
|
Nope, UNIX or Linux permissions are read, write, execute, setuid, setgid. The only way to hide a file or directory is to place a period before the name. I think NFS or SAMBA can do it though.
|
just take away read permission from the directory for other users
|
Quote:
|
Quote:
|
Sorry if I came off like that, I didn't mean to say that your advice was wrong, and I'm sure you knew everything I said anyway. I just wanted to clarify things for the sake of the OP and anyone else reading the post! :)
|
Thanx guys - this helps a bit to know I can't exactly pull it off
Electro - you said SAMBA could do it? I am in fact trying to impliment this on a shared directory, so if smb could pull it off I'd love to know how. |
I said I think, but I recently check the smb.conf manual. It is possible to hide files in SAMBA by including "hide files". Also there is "hide unreadable" and "hide unwritable".
|
Electro is correct about the hide files option (I haven't used hide unreadable or unwritable). There is also a veto files option.
hide files specifies a list of files that will have their msdos attribute set to hidden and veto files just won't display them at all. Have a look at http://us1.samba.org/samba/docs/using_samba/appb.html for more info. |
ACH! hide unreadable is just the thing I was looking for! Thanks much, I will impliment it tonight and see what happens.
|
YES! I added 'hide unreadable = yes' into the share's section of smb.conf and everything is great. Thanx a bunch for the help -- I had thought something like that existed but couldn't find it anywhere!
-BIll |
All times are GMT -5. The time now is 12:27 AM. |