1

I am not a sysadmin, so my knowledge is limited in this topic.

We have an apache with some virtualhosts. For some reason, the group of the files and directories is a gitusers, because we are using hooks on commit sometimes. Sometimes not, but I would like keep this.

Owner of files is www-data.

I've created a new ftp user (a real linux user), called: printftp without shell.

I've added this printftp user to the gitusers group.

Let's say, the directory of our http project is /var/www/print.example.com/www/

This is the home directory for printftp.

My problem is, all the new files created by this user will be: printftp:printftp

Is it possible to focrce the proftpd to inherit the owner and group from the /var/www/print.example.com/www/?

So all new files created by anyone should be: www-data:gitusers

And I also want to change 664 for files, and 775 for directories.

Thanks

vaso123
  • 255

1 Answers1

2

You could create an extra file: /etc/proftpd/conf.d/printftp.conf with following configuration:

Umask                002  002
RequireValidShell    off
DefaultRoot          ~
UseReverseDNS        off

<IfModule mod_cap.c>
  CapabilitiesEngine off
</IfModule>

<Directory /var/www/print.example.com/www/>
  UserOwner   www-data
  GroupOwner  www-data
</Directory>

First part is the umask for your permissions, and second part is for setting the permissions. It's possible you need to tweak the config according to your needs.

Carl
  • 744