I am running a vsftpd FTP server on my Ubuntu server, but when I setup my Netbeans web project to upload files to it, it changes the owner and group to
karel:karel, which is very bad, because the
www-data user now cannot read the file and the webserver stops working.
I login to the FTP server using my Ubuntu account “karel”, with
local_enable enabled. I am running the Netbeans project from a Windows 10 machine.
Is there a setting to disable owner and group change on file upload? I need it to stay
karel:www-data. I have read this question but all the answers, including using the
local_umask setting, only talk about changing file privileges, my problem is changing it’s group.
chown_username is for upload by anonymous user, which I don’t want. I can delete the user group
karel if it would help, I don’t need it for anything.
Other solution would be to allow everyone to read from the files, it is only a virtual machine that only I have access to anyway, but I would rather do it the proper way and not change file group after upload. For example, WinSCP doesn’t change the file group on upload.