Ownership change after FTP login


And odd problem:

I have a parent account (e.g home/parent.user). This account has SSH privs to a machine.

I added an FTP user (call it sub.user) for this person within that group via Virtualmin, with the objective of allowing that user to only have FTP permissions.

This worked… but when sub.user FTPs to the server and authenticates, all the permissons for /home/parent.user and contents change to sub.user:parent.user

If parent.users logs in via SSH they see:

sub.user@server:~$ ls -la .
drwxr-x— 23 sub.user parent.user 4096 Sep 20 15:16 .
…and all files under

Instead of :

parent.user@server:~$ ls -la .
drwxr-x— 23 parent.user parent.user 4096 Sep 20 15:16 .
…and all files under

Changing ownership using chown does not revert.

$ sudo chown -R parent.user /home/parent.user
$ sudo ls -la /home/parent.user
drwxr-x— 23 sub.user parent.user 4096 Sep 20 15:16 .
…and all files under

Then oddly, the permissions revert to parent.user:parent.user without manual intervention after a time with no intervention from me via SSH or the FTP account, almost like some daemon has clicked in and sorted it out.

Now, given Proftpd is running as root, I’d expect the ownership to remain the same and not have to chown everything ?

Is this something withing virtualmin or is it something in the FTP program doing a chown, if that’s possible. I’d expect the permissions to remain intact.



Hmm, I’ve never heard of that happening before… neither Virtualmin nor ProFTPd would change any file ownerships during a login.

As you said, it’s expected by users that permissions should remain intact.

It’s actually possible that the FTP client is what’s doing that. You could try a different client.

However, it sounds like you may have a regular user there, rather than a “Website Access FTP User”.

The latter, the website access ftp user, is a standalone user, but with the way it’s designed, you’d be less likely to run into any ownership issues.

You can create a that kind of user by going into Edit Users, and all the way over on the top-right, you’ll see an option “Add a website FTP access user”.