Page 1 of 1

FTP'd files have incorrect permissions

Posted: Fri 11 May 2018 12:21 pm
by gw4bvy
I've completed my migration of my Vantage Vue weather station, eventually, using CumulusMX from a PC to a Raspberry Pi.

There is one remaining issue. All of the files FTP'd within the Raspberry Pi from CumulusMX to /var/www/html/ have permission -rw------- (600) and therefore get a 403 Forbidden when I try to access them from a Browser. (Looking at the old files on my previous NAS server they had permission -rwxrwxrwx (777) ) .

Help !!
Thanks in Advance,
Roger

Re: FTP'd files have incorrect permissions

Posted: Sat 12 May 2018 10:17 am
by gw4bvy
Solving my own problem - but may be of interest to others.
The problem was the setting in vsftpd. By default this is set to 600. As a minimum it is necessary in vsftpd.conf to set local_umask and anon_umask to 022.
But it still doesn't work. As the FTP is overwritting files that already exist - it DOES NOT change the permissions!!!! You need to delete the files already FTP'd, and then the permissions will be correct on the next upload.
Roger

Re: FTP'd files have incorrect permissions

Posted: Mon 14 May 2018 6:41 pm
by freddie
You don't need your permissions to be as lax as 777. You won't need the execute bit set firstly, as they aren't files that get executed. The only user that needs write permission is the user that FTPs the files - which is also the owner of the files. Therefore you should really tighten up the permissions to 644 (read/write owner, read group and global). It probably doesn't matter, but should your Pi be compromised then the files are wide open to unauthorised editing.