LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2003, 06:01 PM   #1
Punker51
Member
 
Registered: Dec 2003
Posts: 37

Rep: Reputation: 15
Basic permissions questions


Im still confused with permissions in Linux (mandrake 9)

Here is what i want, can u please tell me what perms to use on each folders ? thx

i want users to be able to log in by ftp and do what they want with their files in their directory /home/user

i want them to be locked in this directory /home/user , i dont want them to access /var , /etc or stuff like that

i want users to be able tu put html files in their folders /home/user/public_html and i want those files to be accessible from the outside.

the thing i dont understand is this one: when a user logs in by ftp, it seems that linux sees them as others and not as users...is that possible ?

can i have all those thing i want ? or is it impossible ?


Ex: if i chmod /home/* to 755
- users html files are accessible via Web (/home/user/public_html)
- users can log in by ftp and list the content of their /home dir, they can write and delete files, but they can see the other users folders by writing /home/otheruser in the location box and i dont want that.
- users can browse thru the entire system ...for example /var/www , wich i dont them to be able to

Ex: if i chmod /home/* to 711
- users html files are accessible via Web (/home/user/public_html)
- users can log in by ftp but cannot list the content of their /home dir, they cannot write files
- they can go the other users folders by writing /home/otheruser in the location box but they cannot list
- users can browse thru the entire system ...for example /var/www , wich i dont them to be able to




Thanx for your time, this is verry important for me

Last edited by Punker51; 12-06-2003 at 06:09 PM.
 
Old 12-06-2003, 06:15 PM   #2
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
when you do an "ls -l" you will see something similar:
Code:
drwxr-xr-x    3 rom   rom       4096 Sep 24 15:13 courses
-rw-------    1 root     root          441 Nov 24 18:32 dead.letter
-rwxr--r--    1 root     root        15801 Dec  4 20:49 iwscanswitch.c
-rw-rw-r--    1 rom   rom      10486 Oct 15 15:10 mimeinstall.results
drwxr-xr-x    2 rom   rom       4096 Dec  1 16:01 music
two users there - root, and rom. the ones starting with "d" are directories.
the others are all files with this "rwx rwx rwx".
read it as :
rwx rwx rwx
User Group Others

so, this "-rwxr--r-- 1 root root 15801 Dec 4 20:49 iwscanswitch.c" would mean, that the user has read,write,exec perms on the file. group and others have only read perms on it.

if you want everyone (user,group,others) to be able to do everything on this , you will say,
chmod ugo+rwx iwscanswitch.c = all users, all perms
chmod go+rw iwscanswitch.c = group+others, read+write
chmod go-rx iwscanswitch.c = take awat read/write perms for group+others.

and u get the idea.

the other way is to specify the numbers, like "chmod 755 iwscanswitch.c" which is similar to giving user all perms, and group+others permission to read+execute.

the numbers in 755 correspong to the binary equivalent of "rwxrwxrwx", taken 3 at a time. you know the first three from the left correspond to User, the middle 3 to Group, and the 3 on the right to Others.

User rwx: 000 = 0 - no perms
101 = 5 - read+exec
110 = 6 - read+write, but no exec
111 = 7 - all actions permitted .... and so on. hope u get the idea. so i get the 7 in 755 from the above to give the user rwx perms on the file.

ill stop now. hope that helps.
 
Old 12-06-2003, 06:16 PM   #3
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
oh great, i just saw ur edit, andrealized i didnt have to explain all that. lol
 
Old 12-06-2003, 06:23 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,576

Rep: Reputation: 191Reputation: 191
Which ftp server are you using, Punker51? It seems you need to chroot users to their home dirs (and it's server-specific).
 
Old 12-06-2003, 06:26 PM   #5
Punker51
Member
 
Registered: Dec 2003
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Mara
Which ftp server are you using, Punker51? It seems you need to chroot users to their home dirs (and it's server-specific).
ProFTPD 1.2.5

I added the line

DefaultRoot /home/user user

and it seems to have solve my problem

big THX to you 2

Last edited by Punker51; 12-06-2003 at 07:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 12:50 PM
Basic Questions IntelSlacker Slackware 5 03-26-2005 11:47 PM
basic linux programming/compiling question (permissions error) Godsmacker777 Programming 11 03-17-2005 12:35 PM
a few basic questions speel Mandriva 7 02-06-2005 05:21 PM
Some basic questions Aethelred Linux - Newbie 13 05-08-2004 07:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration