User permissions linux. (proftpd / nginx)
Posted
by
user55745
on Server Fault
See other posts from Server Fault
or by user55745
Published on 2012-10-08T19:44:20Z
Indexed on
2012/10/08
21:39 UTC
Read the original article
Hit count: 247
I've been having a complete nightmare trying to configure proftpd. I've got proftp server working with an sql database. However I want to have any files uploaded able to viewed by the webserver running on the same box.
The folders get created in /var/tmp/ as
rwx------ 2 ftpuser ftpgroup 4096 Oct 8 20:35 50730c4346512
drwx------ 2 ftpuser ftpgroup 4096 Oct 8 20:38 50730f3a811ca
I've tried adding www-data to group with the following
usermod -g www-data ftpuser
But this doesn't allow the web server access.
In proftpd.conf I have the following umask set
Umask 0022
It doesn't seem to make a difference what I set that value to.
/etc/group (sure I've messed up one of these two but I'm getting desperate)
ftpgroup:x:2001:www-data
www-data:x:33:ftpgroup
/etc/passwd
www-data:x:33:33:www-data:/var/www:/bin/sh
proftpd:x:108:65534::/var/run/proftpd:/bin/false
ftp:x:109:65534::/srv/ftp:/bin/false
ftpuser:x:2001:33:proftpd user www-data:/bin/null:/bin/false
The ftpuser table in the database has uid / gid set to 2oo1 for both.
I'm going absolutely crazy trying to solve this any help would be greatly appreciated.
p.s
Also, although if I manually connect to the ftp server I can upload files via FileZilla. Although this isn't working for the web-camera, although there is talky talky going on between the server and the camera.
© Server Fault or respective owner