View previous topic :: View next topic |
Author |
Message |
MG-Cloud Apprentice
Joined: 28 Oct 2003 Posts: 200
|
Posted: Mon Dec 15, 2003 7:40 pm Post subject: Proftpd Permission Denied Errors |
|
|
Hi, I'm having a bunch of errors using proftpd with the default config (except I changed AuthPAM to on and removed the anonymous section). I've created a user, ftptest:ftptest, which also has membership in the groups ftp and users. Its home directory, /home/ftptest, has permissions drwxr-xr-x. When connecting to it through ftp, I get a 550: Permission Denied error whenever I try to upload a file to the home drive. Any suggestions? I tried looking at the documentation but it mentions nothing about this. Thanks! |
|
Back to top |
|
|
skunkworx Guru
Joined: 02 Feb 2003 Posts: 420 Location: Planet Houston
|
Posted: Mon Dec 15, 2003 9:53 pm Post subject: |
|
|
Does user ftptest actually own his home directory? What is the output from this command?
Code: | ls -l /home/ftptest |
|
|
Back to top |
|
|
MG-Cloud Apprentice
Joined: 28 Oct 2003 Posts: 200
|
Posted: Tue Dec 16, 2003 12:58 am Post subject: |
|
|
Yes. The useradd command didn't create the home directory automatically, so I created it with root and then did: chown ftptest:ftptest /home/ftptest .
ls -l ... I can't do this atm because the box is at school, and I have no way of ssh'ing into it at the moment. However, offhand, the directory has:
drwxr-xr-x ?? ftptest ftptest ?? Today .
drwxr-xr-x ?? root root ?? Today ..
-rw-r--r-- 1 root root ?? Today .keep
and nothing else, as it is newly created. |
|
Back to top |
|
|
skunkworx Guru
Joined: 02 Feb 2003 Posts: 420 Location: Planet Houston
|
Posted: Tue Dec 16, 2003 3:06 am Post subject: |
|
|
Hmm. Well, ownership and attributes are what are usually responsible for "permission denied" errors, so you may want to give those a double-check when you can, just to be sure.
But, if that's not the problem, the next place to look would be the ProFTPd configuration file. You say you modified it to use PAM. You might try putting the original configuration file back in place and see if it works with the default authentication. If so, the problem could be PAM returning bad information, possily an incorrect UID for that system user (disclaimer: I haven't played much with PAM so I may be barking up the wrong tree here).
If it doesn't work even with the original config file, then some other set of permissions is getting in the way. If all else fails, you can always strace the FTP server process, to find out what system call is causing the denial, and why. |
|
Back to top |
|
|
MG-Cloud Apprentice
Joined: 28 Oct 2003 Posts: 200
|
Posted: Wed Dec 17, 2003 6:59 pm Post subject: |
|
|
I feel kind of stupid ;/ The command I was executing from ftp was: "put /root/testfile.txt", and of course, ftp tried to put /root/testfile.txt into /root/testfile.txt on the remote host, which is a big nono. I was able to solve this by simply specifying the destination.
Thanks for helping I can't believe I missed that... lol |
|
Back to top |
|
|
|