Solved

FTP Permissioning

Posted on 2000-03-24
3
354 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

867 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

22 Experts available now in Live!

Get 1:1 Help Now