0

We're using plesk with proftpd (on debian5). I want to add a ftpuser USER for the directory /var/www/vhosts/domain.de/httpdocs/test

So I added a system user useradd USER -s /bin/false -d /var/www/vhosts/domain.de/httpdocs/test and setted the pass with passwd. I also tried it with shell, same result.

But I'm not able to login through ftp. What am I doing wrong ?

1
  • Check the directory permissions. If that fails, read the logs. If even that fails, be more verbose in your question. Commented Nov 9, 2010 at 12:24

1 Answer 1

0

The answer is possibly in /var/log/secure, although saying that I've generally found FTP logs to be lacking. The directory /var/www/vhosts/domain.de/httpdocs directory only be executable for psaserv and the username for that vhost (as seen by Plesk).

If you have ACL available (not sure for Debian 5), you could try:
setfacl -m user:USER:r-x /var/www/vhosts/domain.de/httpdocs
setfacl -m -R user:USER:rwx /var/www/vhosts/domain.de/httpdocs/test setfacl -m -R -d user:USER:rwx /var/www/vhosts/domain.de/httpdocs/test

If you get an error complaining about the syntax, you probably need to remount the partition with ACL. Try:
mount -o remount,acl /var or mount -o remount,acl / or whatever the relevant partition is.

If not, I'd advise not giving full permissions to the any user, and instead create a new dummy group for it to replace psaserv for that directory, so, roughly:
groupadd your_dummy_group
for i in $(lid -g psaserv | cut -f2 -d" " | cut -f1 -d"("); do usermod -aG your_dummy_group $i; done
chgrp your_dummy_group /var/www/vhosts/domain.de/httpdocs

That will let you into the directory. As for reading/writing, you'll need to do the same as above except recursively for the directory /var/www/vhosts/domain.de/httpdocs/test and with the group psacln (which, I believe but don't have an installation to test, gives full access to the directory - if not, you'll have more permissions to modify).

Obviously you could 777 the whole thing, but it would be a bad idea.

7
  • I dont have a file /var/log/secure, also i dont have acl. But I tried 777 for testing and it is not working. Commented Nov 9, 2010 at 12:51
  • I love how you went straight to the "bad idea" and ignored the well presented option in the middle. It's /var/log/access.log I believe on Debian based systems, sorry for the mix up. Also, what did you set to 777? Commented Nov 9, 2010 at 12:53
  • yes it's not the nice way, but i want it to work first. and then i work it up the clean way ;-). Also have no access.log. I have a proftpd folder but all logs are emtpy. But I found /opt/psa/var/log/xferlog (from proftpd.conf as TransferLog), but there are also no relevant data. Commented Nov 9, 2010 at 13:00
  • What did you make 777? Which command did you run? Commented Nov 9, 2010 at 13:01
  • /var/www/vhosts/domain.de/httpdocs/test is 777 and owned by www-data Commented Nov 9, 2010 at 13:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.