Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Proftpd Permission Denied Errors
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
MG-Cloud
Apprentice
Apprentice


Joined: 28 Oct 2003
Posts: 200

PostPosted: Mon Dec 15, 2003 7:40 pm    Post subject: Proftpd Permission Denied Errors Reply with quote

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
View user's profile Send private message
skunkworx
Guru
Guru


Joined: 02 Feb 2003
Posts: 420
Location: Planet Houston

PostPosted: Mon Dec 15, 2003 9:53 pm    Post subject: Reply with quote

Does user ftptest actually own his home directory? What is the output from this command?

Code:
ls -l /home/ftptest
Back to top
View user's profile Send private message
MG-Cloud
Apprentice
Apprentice


Joined: 28 Oct 2003
Posts: 200

PostPosted: Tue Dec 16, 2003 12:58 am    Post subject: Reply with quote

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
View user's profile Send private message
skunkworx
Guru
Guru


Joined: 02 Feb 2003
Posts: 420
Location: Planet Houston

PostPosted: Tue Dec 16, 2003 3:06 am    Post subject: Reply with quote

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
View user's profile Send private message
MG-Cloud
Apprentice
Apprentice


Joined: 28 Oct 2003
Posts: 200

PostPosted: Wed Dec 17, 2003 6:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum