LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   FTP user account [Slackware 8.1] (https://www.linuxquestions.org/questions/linux-server-73/ftp-user-account-%5Bslackware-8-1%5D-653138/)

jhmdev 07-02-2008 01:20 PM

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

tungvs 07-02-2008 08:05 PM

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.

unSpawn 07-04-2008 06:21 AM

Quote:

Originally Posted by tungvs (Post 3202267)
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.

tungvs 07-04-2008 09:28 AM

Quote:

Originally Posted by unSpawn (Post 3203838)
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)


All times are GMT -5. The time now is 06:20 PM.