Quote:
Quote:
|
Ok i leave it as it is but any ideas why is not working and the user can browse to / ?
Maybe a folders permissions are wrong? |
Ok i found a working tutorial and all is working now using this:
Code:
http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/ Code:
/home/nginx/domains/mydomain.com/public/uploads Code:
usermod -d /home/nginx/domains/mydomain.com/public/uploads -s /sbin/nologin guestuser The user is going to the old path again... The problem seems to be that is working only with a path that the username of a user exists and in path it doesn't exist :( Running this grep guestuser /etc/passwd i am getting the correct path but not working: Code:
guestuser:x:504:504::/home/nginx/domains/mydoamin.com/public/uploads:/sbin/nologin |
Quote:
I guess you're trying to setup sftp (that is based on ssh), but is totally different from ftp (based on a ftp server like vsftpd) So using the vsftpd config posted above and using ftp, your user can transfer files in the desired location using the ftp protocol If you want to use sftp, have a look here for an example (written for debian, but applies to any distro) Regards |
Yes ok this works but the problem is that i can't use a path without users name like:
Code:
/home/nginx/domains/mydomain.com/public Code:
/home/username |
Quote:
Quote:
|
I am talking about sftp and yes i have 755 for folders and 644 for files but if i set the nginx folder to root:root then is not working the site :(
|
Quote:
BTW why set ownership to root:root and not let the directory owned by the normal user? |
Quote:
I am getting a blank white page and on error logs i get permission denied. It works only with nginx:nginx permissions.... Thanks |
Quote:
If that's the case disable it temporarily and see what you get. Or use: Code:
chcon -R -t httpd_sys_content_t /home/nginx/domains/mydomain.com/public |
I am using Centos and SElinux is disabled....
|
Quote:
Anyway add the user in nginx group and see what happens. Other than that, I don't know what else to think. |
Ok anyway thanks for your help !!!!
|
one of the reason why nginx is the only working could be avlue that was set on vsftpd.conf something like "vsftpd_user=nginx"
|
All times are GMT -5. The time now is 01:36 AM. |