-1

I have created a ftp user called " ftp_user " but whenever something is uploaded or created via this user, the permission becomes 600 and the group owner also changes to ftp_user

This makes it unreadable for the www-data user ( web server user ) I have to fix the permissions and ownership to be read by www-data manually each time

I want the permission to be 755 or 777 and thwe owner to remain as www-data by which the www-data user can still access the files

Below newfile is a file created by the ftp_user

    -rwxrwxrwx  1 ftp_user www-data         1646 Sep  2 18:58 artisan
    -rwxrwxrwx  1 ftp_user www-data          503 Sep  2 18:58 gulpfile.js
    -rwxrwxrwx  1 ftp_user www-data          567 Sep  2 18:58 server.php
    drwxrwxrwx  2 ftp_user www-data         4096 Sep  2 18:58 tests
    -rwxrwxrwx  1 ftp_user www-data          449 Sep  6 12:41 User.php
    drwxrwxrwx  3 ftp_user www-data         4096 Sep 22 19:06 bootstrap
    drwxrwxrwx  2 ftp_user www-data         4096 Jan 26 15:06 blog
    -rwxrwxrwx  1 ftp_user www-data         1357 Jan 26 15:06 composer.json_23nov_16
    -rwxrwxrwx  1 ftp_user www-data         1389 Jan 26 15:06 composer.json
    -rwxrwxrwx  1 ftp_user www-data         1317 Jan 26 15:06 cc
    -rwxrwxrwx  1 ftp_user www-data           67 Jan 26 15:06 info.php
    drwxrwxrwx 10 ftp_user www-data         4096 Jan 26 15:06 app
    drwxrwxrwx 12 ftp_user www-data         4096 Jan 26 15:06 public
    drwxrwxrwx  2 ftp_user www-data         4096 Jan 26 15:06 config
    -rw-------  1 ftp_user ftp_user      0 Jan 30 15:26 newfile

Does anyone has a solution ? Thanks in advance !

  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306) – jww Jan 30 '17 at 12:35

1 Answers1

1

if you want to change permission of uploaded files in vsftp go to /etc/vsftpd.conf you can specify the mask of uploaded file with this property

local_umask=000

if you specify 000 as a umask uploaded file will take the permission 666 and uploaded directory will get the permission 777.

Mohamed Amine Ouali
  • 575
  • 1
  • 8
  • 23