Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Servers > User Permissions on an FTP Server

Forgot Password?
 Servers   Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 04-07-2005   #1 (permalink)
Just Joined!
 
Join Date: Apr 2005
Posts: 4
User Permissions on an FTP Server

Is it possible to set different permissions for different users in an FTP? I have the users listed in the ftpuser_list file.


Thank you
mje397 is offline  


Old 04-07-2005   #2 (permalink)
Linux Newbie
 
Join Date: Mar 2005
Posts: 230
Perhaps if you go into what you want to do with more detail I can think of the best way to get it to work for you.

The answer is yes, depending on what you want.
SilentRage is offline  
Old 04-07-2005   #3 (permalink)
Just Joined!
 
Join Date: Apr 2005
Posts: 4
FTP Query

Thnx.. I would like to have one common user ( where everyone can read and write) and three indivudual users where only the individual users have permission to access.

Is it possible?
mje397 is offline  
Old 04-07-2005   #4 (permalink)
Linux Newbie
 
Join Date: Mar 2005
Posts: 230
Got an answer for you.

Yes, this is possible.

Got some questions for you.

What ftp server are you running? vsftpd I hope.

Do all these users share the same ftp root directory? The answer to this question does not effect my answer to your question. Just a matter of implementation.
SilentRage is offline  
Old 04-07-2005   #5 (permalink)
Just Joined!
 
Join Date: Apr 2005
Posts: 4
Yes, I am using vsftpd.. And all users are in the same root directory...
mje397 is offline  
Old 04-07-2005   #6 (permalink)
Linux Newbie
 
Join Date: Mar 2005
Posts: 230
I'm going to give you an example implementation, which you will need to adapt to your situation. I'm going to use the local root of /var/ftp and 3 system users called "trusted", "joe", and "shmitt".

COMMANDLINE

groupadd ftpusers
useradd -M -s /sbin/nologin -g ftpusers trusted
passwd trusted
useradd -M -s /sbin/nologin -g ftpusers joe
passwd joe
useradd -M -s /sbin/nologin -g ftpusers shmitt
passwd shmitt

mkdir /var/ftp/joe
chmod 700 /var/ftp/joe
chown joe /var/ftp/joe

mkdir /var/ftp/shmitt
chmod 700 /var/ftp/shmitt
chown joe /var/ftp/shmitt

REQUIRED CONFIGURATION

local_enable=YES
write_enable=YES
chroot_local_user=YES
anonymous_enable=NO
local_root=/var/ftp

OPTIONAL CONFIGURATION

userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/ftpuser_list
local_umask=022

FILE CONTENTS [/etc/ftpuser_list]
trusted
joe
shmitt
SilentRage is offline  
Old 04-07-2005   #7 (permalink)
Just Joined!
 
Join Date: Apr 2005
Posts: 4
Thnx buddy... I am slightly confused.. sorry I am new to the entire Linux.. still in the learning stage..


So in ur example.. we have 3 users in the list. And whatever configuration I give using chroot, userlist_enable, userlist_deny applies collectively to all the three users.

Am I right?

Now if I defne trusted as a group with menbers joe and shmitt, and other two as individual users, can I have sth like this..

Trusted can be accessed by both users.
Joe cannot acccess shmitt
smith cannot access joe
mje397 is offline  
Old 04-07-2005   #8 (permalink)
Linux Newbie
 
Join Date: Mar 2005
Posts: 230
The 3 userlist options do apply to the ftpusers_list file. userlist_enable makes sure that vsftpd even uses the file. userlist_deny was set to NO so that vsftpd knows that this is a list of allowed users, rather than denied users. userlist_file specified the full path and file name of the userlist file. The chroot should apply to all 3 users.

Now if I define trusted as a group...

You could leave out the shared (trusted) user if you want to so that you only have "joe" and "schmitt". If one user uploads a file outside of his directory, then the other user(s) can access it.

The "joe" user won't be able to access the "schmitt" directory cause we set the directory permissions with chmod and chown so that ONLY that user has access. vsftpd will run as the user who logs in, so file system permissions will apply to ftp access.
SilentRage is offline  
Old 07-31-2009   #9 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 1
it is possible to add user and able to read and write their shared directory

let say their shared directory is testuser and the user are:
user1: read and write
user2: read and write
user3;read
user4:read

their login shell is /sbin/nologin

thanks
asercey is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:45 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2