* How to hide . folders @ 2004-08-05 20:06 Eve Atley 2004-08-05 22:15 ` Ken Moffat 0 siblings, 1 reply; 7+ messages in thread From: Eve Atley @ 2004-08-05 20:06 UTC (permalink / raw) To: Linux-Newbie I have a folder, /home/shared, which contains directories that are literally 'shares' for a small network. I've set up permissions in which a person can or cannot access these directories based on being a group member. When the person logs in via SSH, they see these folders AND all sorts of 'grayed out' folders, usually . directories. How can I get it to show ONLY the folders I want them to see and none of the system / critical files, without using client-side 'don't show hidden files and folders'? Thanks, Eve - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to hide . folders 2004-08-05 20:06 How to hide . folders Eve Atley @ 2004-08-05 22:15 ` Ken Moffat 2004-08-06 1:56 ` Eve Atley 0 siblings, 1 reply; 7+ messages in thread From: Ken Moffat @ 2004-08-05 22:15 UTC (permalink / raw) To: Eve Atley; +Cc: Linux-Newbie On Thu, 5 Aug 2004, Eve Atley wrote: > > I have a folder, /home/shared, which contains directories that are literally > 'shares' for a small network. I've set up permissions in which a person can > or cannot access these directories based on being a group member. > > When the person logs in via SSH, they see these folders AND all sorts of > 'grayed out' folders, usually . directories. How can I get it to show ONLY > the folders I want them to see and none of the system / critical files, > without using client-side 'don't show hidden files and folders'? > > Thanks, > Eve > I think you're omitting something in your description - if I log in to another box on my network using ssh, I get a normal terminal session and I'm in my ~/ directory, either from a console or from an xterm. "grayed out" doesn't fit with that, it sounds as if they are using some sort of graphical front-end. And therefore, it sounds as if it *is* a client-side "don't show hidden..." issue. Or tell them to run ssh from within a(n) aterm|gterm|konsole|xterm. AFAIK there is no way of hiding non-hidden directories such as /etc and /usr/bin - normal users will have read access to these, so they can use e.g. /usr/bin/zgrep as an example script. Somewhat similar to when you save from a graphical browser and blunder around the directory hierarchy trying to find the right place to save something : system directories show up if you go too far up the hierarchy, but permissions should prevent you writing in them. Ken -- das eine Mal als Tragödie, das andere Mal als Farce - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to hide . folders 2004-08-05 22:15 ` Ken Moffat @ 2004-08-06 1:56 ` Eve Atley 2004-08-06 8:13 ` Ken Moffat ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Eve Atley @ 2004-08-06 1:56 UTC (permalink / raw) To: Ken Moffat; +Cc: Linux-Newbie Ken, thanks for the reply. You're correct... This is SSH via a graphical client. They are non-technical folks who need something simple. I'm just trying to protect any system files from accidental deletion. Is my question better stated, then, as how to prevent users from deleting any of the directories they encounter? If that's the correct question, then is my solution to set a read-only on any folders that I don't wish deleted? > something : system directories show up if you go too far up the > hierarchy, but permissions should prevent you writing in them. Is it possible to keep users from proceeding up further in the hierarchy, by chance? - Eve - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to hide . folders 2004-08-06 1:56 ` Eve Atley @ 2004-08-06 8:13 ` Ken Moffat [not found] ` <Pine.LNX.4.58.0408060856370.23328@ppg_penguin.kenmoffat.uk linux.net> 2004-08-07 6:02 ` Stephen Samuel 2 siblings, 0 replies; 7+ messages in thread From: Ken Moffat @ 2004-08-06 8:13 UTC (permalink / raw) To: Eve Atley; +Cc: Linux-Newbie On Thu, 5 Aug 2004, Eve Atley wrote: > > Ken, thanks for the reply. > > You're correct... This is SSH via a graphical client. They are non-technical > folks who need something simple. I'm just trying to protect any system files > from accidental deletion. > > Is my question better stated, then, as how to prevent users from deleting > any of the directories they encounter? If that's the correct question, then > is my solution to set a read-only on any folders that I don't wish deleted? > I'm not an expert on this, but a quick test suggests users need write permission on the directory to be able to write/delete the contents. For genuine system directories, users should already be unable to delete them (hint: don't test this on the real directories just in case!). For your new data directories, maybe some of the data can conveniently live in read-only directories. Beyond that, frequent backups (search for backing up with rsync) are good. > > something : system directories show up if you go too far up the > > hierarchy, but permissions should prevent you writing in them. > > Is it possible to keep users from proceeding up further in the hierarchy, by > chance? > > - Eve > > I don't think so. Normally, everyone can read the top-level directories except lost+found and they certainly need access to /tmp, Ken -- das eine Mal als Tragödie, das andere Mal als Farce - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <Pine.LNX.4.58.0408060856370.23328@ppg_penguin.kenmoffat.uk linux.net>]
* Re: How to hide . folders [not found] ` <Pine.LNX.4.58.0408060856370.23328@ppg_penguin.kenmoffat.uk linux.net> @ 2004-08-06 15:55 ` Ray Olszewski 0 siblings, 0 replies; 7+ messages in thread From: Ray Olszewski @ 2004-08-06 15:55 UTC (permalink / raw) To: Linux-Newbie At 09:13 AM 8/6/2004 +0100, Ken Moffat wrote: >On Thu, 5 Aug 2004, Eve Atley wrote: > > > > > Ken, thanks for the reply. > > > > You're correct... This is SSH via a graphical client. They are > non-technical > > folks who need something simple. I'm just trying to protect any system > files > > from accidental deletion. It might be worth your while to tell us the "graphical client" involved, and (of more use) what server is running on the Linux end for it to connect to. It sounds like you are using ssh to tunnel something, and the unnamed something may have some abilities to control what users see. ssh by itself (that is, used to initiate a console session) does not have that ability. > > > > Is my question better stated, then, as how to prevent users from deleting > > any of the directories they encounter? If that's the correct question, then > > is my solution to set a read-only on any folders that I don't wish deleted? > > > I'm not an expert on this, but a quick test suggests users need write >permission on the directory to be able to write/delete the contents. Ken is correct as far as he goes, but I don't know if he's gone far enough to answer your question. Remember that in Linux or Unix (at least with native-mode filesystems), every directory and file has 3 sets of permissions -- for the directory/file's owner, its group, and "everybody". Here, you're concerned about either the second or third set ... from what you've written, I'm not sure which. The directory's actual owner will almost surely want to have rwx permissions. But the directory's group and "everybody" modes can be more restrictive. How restrictive depends on details you have not told us about your setup. For example, if you want these users to be able to cd to the directories in question, list their contents, and run programs and scripts located in them, then the users need execute (x) access to these directories. Read access (r) by itself will not do. The files and subdirectories within these directories should be, for those users, either read-only (r--) or read-execute (r-x), as appropriate. Whether these settings apply to the group permissions or the everybody permissions depends on details that either you have not provided or I missed. > For genuine system directories, users should already be unable to >delete them (hint: don't test this on the real directories just in >case!). For your new data directories, maybe some of the data can >conveniently live in read-only directories. Beyond that, frequent >backups (search for backing up with rsync) are good. > > > > something : system directories show up if you go too far up the > > > hierarchy, but permissions should prevent you writing in them. > > > > Is it possible to keep users from proceeding up further in the > hierarchy, by > > chance? > > > > - Eve > > > > > > I don't think so. Normally, everyone can read the top-level >directories except lost+found and they certainly need access to /tmp, Right. Your only hope here is that the specific "graphical client" your naive users connect through has some capability to help you. I don't know a way to prevent any user from seeing the very top level of your filesystem hierarchy (the contents of /). And your system will act very strangely if /tmp is not mode 777, as Ken says. Beyond that ... other top-level directories are usually mode 755, and need to be so users can run the programs and access the other files (e.g., program configuration files) in them. - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to hide . folders 2004-08-06 1:56 ` Eve Atley 2004-08-06 8:13 ` Ken Moffat [not found] ` <Pine.LNX.4.58.0408060856370.23328@ppg_penguin.kenmoffat.uk linux.net> @ 2004-08-07 6:02 ` Stephen Samuel 2004-08-10 18:16 ` How to hide . folders (resolved) Eve Atley 2 siblings, 1 reply; 7+ messages in thread From: Stephen Samuel @ 2004-08-07 6:02 UTC (permalink / raw) To: Eve Atley; +Cc: Linux-Newbie Eve Atley wrote: > Ken, thanks for the reply. > Is my question better stated, then, as how to prevent users from deleting > any of the directories they encounter? If that's the correct question, then > is my solution to set a read-only on any folders that I don't wish deleted? There are a couple of things here: if you set the sticky bit ( u+t ) then users will only be able to delete files that they own unless they own the sticky The ability to delete files depends on the permissions of the directory they are in. Removing a directory requires permission to the directory that contains it as well as that the directory be empty. If a directory is readonly to a user and contains *anything* (other than . and ..) then it is effectively un-removable regardless of parent directory permisions. It is still renameable if the directory is rw with no sticky bit set. > > >>something : system directories show up if you go too far up the >>hierarchy, but permissions should prevent you writing in them. > > > Is it possible to keep users from proceeding up further in the hierarchy, by > chance? If you lave the execute bit on but turn off the read bit, then programs (including GUIs) will be unable to search the directory. Any program which knows the name of the file it's looking for will still work fine. I think that this may be close enough to what you want. -- Stephen Samuel +1(604)876-0426 samuel@bcgreen.com http://www.bcgreen.com/~samuel/ Powerful committed communication. Transformation touching the jewel within each person and bringing it to light. - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: How to hide . folders (resolved) 2004-08-07 6:02 ` Stephen Samuel @ 2004-08-10 18:16 ` Eve Atley 0 siblings, 0 replies; 7+ messages in thread From: Eve Atley @ 2004-08-10 18:16 UTC (permalink / raw) To: Stephen Samuel; +Cc: Linux-Newbie Just wanted to update folks on my solution to this problem of wanting to hide all but necessary folders to users logging in via an SSH GUI! What got me started in the right direction was sorting out permissions and finding out more about the sticky bit. What eventually fixed my issue for this situation was adding a user like so: useradd -M -d /home/shared/ [username] -p [password] The scenario in this case was to dump a user upon login to a particular directory, but NOT create any extraneous folders. -M eliminates the need for all those folders to be created in the first place. -d starts them out in the folder I request (in this case /home/shared). It appears to create a bash-history only, but I really don't mind if someone accidentally deletes this one, since these are logins from a GUI. Thanks to all, Eve - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-08-10 18:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 20:06 How to hide . folders Eve Atley
2004-08-05 22:15 ` Ken Moffat
2004-08-06 1:56 ` Eve Atley
2004-08-06 8:13 ` Ken Moffat
[not found] ` <Pine.LNX.4.58.0408060856370.23328@ppg_penguin.kenmoffat.uk linux.net>
2004-08-06 15:55 ` Ray Olszewski
2004-08-07 6:02 ` Stephen Samuel
2004-08-10 18:16 ` How to hide . folders (resolved) Eve Atley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox