My web root, /var/www
, is owned by my personal user on the system, however I have also set up an FTP user with /var/www
as its home directory.
If I put new files in /var/www
via SSH logged in as either user (nano /var/www/something.html
) everything is fine and new files recieve permissions 644, which is what I want. New directories put in via mkdir
also work fine through each user and recieve permissions 755, also what I want.
The problem is that if I put new files in it via FTP, through either user, they recieve permissions 600, which is not what I want. Directories recieve permissions 700.
So how do I fix it so new files recieve the permissions I want? I am using vsftpd as an FTP server, if that helps anyone.