2

I'm running Ubuntu Linux on my VPS, and I have set up VSFTP to easily manage FTP access to a user, only for a given folder. This folder is under /var/www/html/

The user on the system, called account(as an example), can log in through FTP, look at the directory set to him as default "home" and where he is chrooted to. However, any file transaction will fail (write actions) due to permissions.

So i checked out the folder, and it turned out www-data:www-data owns it. So I did: sudo usermod -a -G www-data account to add the account to the usergroup, and that way get access to the same permissions. I also tried to set account as an owner of the directory i wanted

root@serverhost:/var/www/html/gpx/_SERVERS/accounts/accountname# ls -li
total 4
3253350 drwxrwxrwx 7 www-data account 4096 Oct 12 15:07 Folder.I.Want.Acc.To.write.in
root@serverhost:/var/www/html/gpx/_SERVERS/accounts/accountname#

As you can see, both permissions and ownership should indicate that the "account" user should be able to write and do changes in there. But over FTP, the permission denied 550 error arrives. Any idea what to do?

EDIT:

The issue must be related to FTP as I were just able to make a new directory in the folder i wanted, through SSH terminal.

techraf
  • 4,243
  • 8
  • 29
  • 44
denNorske
  • 121
  • 7

1 Answers1

0

Thanks to @MarkoPolo I were able to find out how to fix it.

This link described how to let other users also have write permission to the www-data owned folders. It worked like a charm

Just beware that you might want to change the default chmod values of uploaded files by the user. They were default 022 and you would probably want it 655 or even 755/775 - by modifying the umask value and the file-open-mode value accordingly in VSFTP config file.

denNorske
  • 121
  • 7