Click to See Complete Forum and Search --> : question about permissions and such....


jaysee_dentun
07-17-2001, 08:40 PM
okay I'm a total newbie, anyway I've been experimentating around with permissions and I accidently made it so regular users cant use the "cd" command (to change directories ya know) and therefore they cant log in...so my question is where is this command located so I can give regular users permission to use it again.


And also in general how do you set up the permissions on your machine. Basically what I am trying to do is have it so that regular users can see (read?) nothing but their home directories. Of course I want them to be able to execute things in certain directories but not actually able to see the listing of commands in a directory (like /bin) Why you ask? To make things as simple as possible. I am trying to get my family into linux also hehe (wish me luck) and when they are looking for their files (mp3's pictures documents) it would only confuse them to see all these directories (/bin, /etc, /dev, etc.) when all they need to see is /home/username. Yes I know when they log in they will be in their directory by default but if they accidently get out of it they will get lost (I love em but they are dumba$$es hehe).

Thanks for any help!!!!!

[ 17 July 2001: Message edited by: jaysee_dentun ]

[ 17 July 2001: Message edited by: jaysee_dentun ]

Third times the charm!

[ 17 July 2001: Message edited by: jaysee_dentun ]

Linuxcool
07-17-2001, 11:36 PM
The cd command is a command that is built into the bash shell. That's why you won't find it in any directory.

What you did to lock people out of directories, is to have removed their execution permission. You must have execution permission to be able to cd into a directory. Also, every directory in the path to the directory they want to cd into, they must have execution permission.

Example:/path/to/directory

The execution permission for the directories path, to, and directory must be set so that a user can cd into directory.

As for preventing people from seeing the commands in directories like /bin but allowing them to execute them, I'm going to have to do more research on that. It seems like you can't do that. To execute a command, it seems like you need not only execution permission but also read permission.

[ 17 July 2001: Message edited by: Linuxcool ]

bdg1983
07-18-2001, 05:47 AM
Perhaps the File Permission (http://www.linuxnewbie.org/nhf/intel/filesys/fileperms.html) NHF can explain it better than I can. I'm sure of that.

Strike
07-18-2001, 01:04 PM
I think it would honestly be a lot more trouble than it's worth to try and hide all those directories from them. You can of course disallow them from viewing the directory by changing the permissions accordingly (I think taking the executable bit off of a directory disallows it even being listed, but you could just remove read-write-execute access from everyone ... but then I'd make sure that every one of the weirdo users that daemons might run as is in a separate group that DOES have the proper permissions). But anyway, like I said, this would be more trouble than it is worth, it seems.