Solved

FTP Permissioning

Posted on 2000-03-24
3
355 Views
Last Modified: 2008-03-06
I am running an FTP server on RH6.  I have 2 questions.
I created a directory called upload. I have permissioned the Dir so that everyone has 'rwx' access (chmod 777).  However when I ftp into it I still can not upload files to that dir. It tells me upload access is denied.
Assuming I can get that working, then my second question would be:

How would I give just one user write or upload permission to
the upload dir on my ftp server (/home/ftp/upload)? Would have to make him a new group and do a chgrp on the directory??

Thanks
0
Comment
Question by:jkipp_66
3 Comments
 
LVL 4

Accepted Solution

by:
kiffney earned 200 total points
ID: 2655858
If you have an /etc/ftpaccess file, you need a line in it that says something like

upload /home/ftp /incoming yes ftp ftp 0666

in which you should replace /home/ftp with the actual ftp 'root' directory, and under /home/ftp you should have an incoming/ directory with permissions 0777.  I think you also need to have an 'ftp' user created.  the ftpaccess and ftpd man pages have more details, but I think this is the part you might be missing.

The way wu-ftpd (which is what I think that version of redhat uses) handles users by default is it chroots the ftp user to his 'home directory', so the 'ftp' user winds up in the /home/ftp directory (which looks like the only directory since he's chrooted), and the user 'joe' winds up in /home/joe, where he has whatever permissions the upload command gives him.  I could be wrong here though since it's been a while since I messed with this.  
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2656178
Actually wu-ftp doesn't chroot to the user's dir. Ordinary users (as listed in the passwd file) have normal rights with respect to uploading/downloading. If they can read/write to a dir while directly logged in they can upload/download to those dirs from ftp.

When you set up anonymous ftp, wu-ftp does chroot to the anon ftp dir.

As noted /etc/ftpaccess can be used to limit/grant ftp privs. You can see what can be done by looking at "man ftpaccess"

0
 
LVL 3

Expert Comment

by:jyu_88
ID: 2657249
For fine-tuned config, You'd better off with proftpd. It has Apache-like directory directives to control permission. Also, users will access the sites with the same rights as OS user (so, you can tweak UNIX-style file/directory permission to your like), and it is easy to turn the chroot on for all users, one single directive in the main config file: DefaultRoot ~.
www.proftpd.org
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now