LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-02-2008, 02:20 PM   #1
jhmdev
LQ Newbie
 
Registered: Jul 2008
Distribution: Slackware 8.1, Gentoo 1.6
Posts: 7

Rep: Reputation: 0
FTP user account [Slackware 8.1]


OK, I don't know much about Linux, and even less about Networking, but here is my task:

I must setup a user account that will allow a partner to push (upload) files to their home directory via FTP, thats it. The user cannot do anything else on this machine or even within their own home directory, no downloading, or modifying of files allowed.

I know how to create a new user, but thats about it.

I searched for this topic and couldn't find Slackware-specific instructions anywhere.

Thanks
 
Old 07-02-2008, 09:05 PM   #2
tungvs
Member
 
Registered: May 2008
Distribution: Centos; Ubuntu; Fedora
Posts: 98

Rep: Reputation: 15
This idea may help:
1. create a normal user with a home directory
2. change the permission on the directory to -w-------, which makes the user have write (upload) permission only
3. change the option ch_owner (or something like that) in the FTP configuration file to someone different from the user. This option make the file's owner uploaded to your server change to anyone you like.Then use the local_umask option to set initial permission for the files to rwx------ or anything that make the upload user cannot read, write or execute.
4. in additional, you have to use chroot_jail option to make sure the upload-only user cannot cd to any directories except his home.

Last edited by tungvs; 07-02-2008 at 09:07 PM.
 
Old 07-04-2008, 07:21 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,671
Blog Entries: 54

Rep: Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953
Quote:
Originally Posted by tungvs View Post
2. change the permission on the directory to -w-------, which makes the user have write (upload) permission only
Files can be write-only but directories need the read and execute bits set to enable reading directory contents. Adding content to a directory means writing to the directory inode, so that means it needs the write bit set as well.
 
Old 07-04-2008, 10:28 AM   #4
tungvs
Member
 
Registered: May 2008
Distribution: Centos; Ubuntu; Fedora
Posts: 98

Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
Files can be write-only but directories need the read and execute bits set to enable reading directory contents. Adding content to a directory means writing to the directory inode, so that means it needs the write bit set as well.
That's correct. The directory's permission must be rwx------ to be read (or list) and written (upload)
 
  


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
ftp cannot log in using new user account wendallsan Linux - Software 0 12-07-2004 09:31 PM
ftp user account password.... tosszafer Linux - Security 1 10-30-2004 07:05 PM
NEED HELP WITH FTP user account and directory setup aikym1 Linux - Security 1 10-06-2004 07:33 AM
ftp user account? marri Linux - Software 0 05-05-2004 07:45 AM
Slackware user account ? tranquil.au Slackware 1 01-19-2004 07:43 AM


All times are GMT -5. The time now is 01:37 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration