LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-24-2002, 11:55 PM   #1
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Enter other users' directories


How can I make it so a regular user can enter other users' directories? On the same system of course. So let's say I setup user cool, and user dork. I want user cool to be able to enter user dork's home directory (/home/dork) and also have permissions xw and r, while not taking any permissions away from user dork.

Any ideas?

Cool
 
Old 11-24-2002, 11:58 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
btw, I have tried simply making them all part of the same group and chowning the directory to that group, but no dice...

Let me tell you what I *really* want to do, maybe you can help me better that way

I have user ftp on the system. And the users home directory (/home/ftp) is the anonymous chroot for anonymous login on my ftp server. I want user masterc to be able to enter that home directory, place files in there, and remove files as well. I have added masterc to the ftp group, but no dice, and owner:group of the /home/ftp and subdirectories/files is ftp:ftp

So, now, any ideas?



Cool
 
Old 11-25-2002, 12:14 AM   #3
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Here, http://mechfire.net/warftpd/allowing.htm
But honestly, what your ftpusers should say about you, may be it says no-no Chad noway you can get in?
 
Old 11-25-2002, 12:20 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Thanks for the link Boris

Hey, did you get my email? If not, I am wondering if you remember that security program that displays the access info when you go to your homepage. So if I pointed my browser to http://masterc.no-ip.org/security

Or something like that, it would display info about my site...

Anyway, thanks again for the link.

Cool
 
Old 11-25-2002, 12:24 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Well, on that site it describes how to enter a directory on an ftp...

What I mean to do is a little different. On my box, not via ftp, I want my regular user to be able to basically have complete control over /home/ftp but still allow this to be seen and used by anonymous login. So I don't *think* I should change any perm's on this directory as it would dork up the ability for the anonymous folks to see the files...

Unless I am missing something, which I usually am.

Cool
 
Old 11-25-2002, 12:40 AM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
It is puresecure from dmarc http://www.demarc.com/
What about ftpusers and ftpaccess files?
 
Old 11-25-2002, 12:49 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
That's it! Thanks for security program link

Ftpusers and ftpaccess file... I will have to check into that... I am not sure... Thanks for some ideas though.

Cool
 
Old 11-25-2002, 12:55 AM   #8
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
So, set the gid bit on /home/ftp, add your cool users to group ftp, change
ownership of /home/ftp to ftp:ftp, and you should be good to go. . .

You said something about "no dice", but do you mean masterc doesn't have
free access to the tree, or that anonymous ftp doesn't?

Did you have masterc do a newgrp (or log off and log back in)?
 
Old 11-25-2002, 08:57 AM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Mornin! Set the gid bit? That might be something I haven't done, but I don't know how.. Yeah, cool user is in group ftp, ownership of /home/ftp is ftp:ftp, so I am thinking maybe all I need to do is the gid bit, but how?

What I meant by no dice is that masterc doesn't have free access. Anonymous ftp is workin like a charm though, and that's what I am trying to not dork up.

newgrp is new to me as well, but I have logged off and back in several times since I set masterc to be part of that group.

Cool
 
Old 11-25-2002, 02:50 PM   #10
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
make them part of the same group and chown the direcotry to that group... after that chmod the direcotry so the group can have full access... that should do it...


PS: I am now following you... hehe

Save teh penguin
 
Old 11-25-2002, 03:03 PM   #11
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
The gid bit is like the uid bit, it causes everything under /home/ftp to have
the same group executable permissions as /home/ftp.
man chmod
You may have to do a
newgrp ftp
at least once before you are considered part of the group, though that
doesn't seem right.
man newgrp
 
Old 11-25-2002, 09:12 PM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Ok, so I am reading man chmod, and I think this is a very important section, and probably the one with part of my answer in it, but I am having problems figuring part of it out:

Quote:
The letters `rwxXstugo' select the new permissions for the
affected users: read (r), write (w), execute (or access
for directories) (x), execute only if the file is a direc-
tory or already has execute permission for some user (X),
set user or group ID on execution (s), sticky bit (t), the
permissions that the user who owns the file currently has
for it (u), the permissions that other users in the file's
group have for it (g), and the permissions that other
users not in the file's group have for it (o). (Thus,
`chmod g-s file' removes the set-group-ID (sgid) bit,
`chmod ug+s file' sets both the suid and sgid bits, while
`chmod o+s file' does nothing.)
So it says that x on a directory allows users to enter it? So if I 'chmod -R 733 /home/ftp' then I will allow my user (masterc) access, and then write priviledges?

Or am I reading that wrong?

Also it goes on, talking about setting the "g" bit. Is that something else that I need to set to allow my "other" (I only have 3 users on my system, root, me (masterc) and lfs, well and ftp if he counts ) users access?

I will be reading man newgrp here in a minute, and will get back on that.

Thanks for the ideas on what to man though.

Cool
 
Old 11-25-2002, 09:15 PM   #13
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Whoa, ok. So newgrp isn't permenent then, it's just for a specific session, a sort of su. If I newgrp - ftp then I will gain those perms, I see. Thanks for that, that'll help alot, especially if I can't figure out this chmod business.

Cool
 
Old 11-26-2002, 12:28 AM   #14
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
You have to allow read acces to the group that own /home/ftp.
chmod 770 /home/ftp (probably -R) (do you need anyone else to be able
to read or write to that dir, besides the ftp group and the ftp user?)
The executable bit on a directory modifies the ability for that dir to be
statted, which affects everything under it (if a dir isn't executable, you
can't read anything, write anything, etc. under it).
 
Old 11-27-2002, 12:57 AM   #15
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Cool, ok thanks for the clarification. I am workin like a mutha lately, and haven't had time to try this out, and a few other things that I have been thinking of, but will very soon.

Thanks again for the ideas and commands et al.

Cool
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
new directories for new users kvtournh Mandriva 1 09-07-2005 10:07 AM
securing users to certain directories ? lozza1978 Linux - Newbie 2 05-09-2005 10:04 PM
Skeleton directories for new users? jungatheart Linux - Newbie 2 04-24-2004 03:44 PM
How to copy one file in all users directories aizkorri Programming 1 09-02-2002 07:32 AM
How to backup directories used by several users? J_Szucs Linux - Software 3 05-08-2002 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration