H
H
hunterpeace2017-11-21 09:30:46
Apache HTTP Server
hunterpeace, 2017-11-21 09:30:46

How to set up an FTP account on Ubuntu?

There is an Ubuntu server with Apache and an FTP server.
Files created by FTP have permissions - username webmaster, groupname webmaster.
Apache generated are www-data and www-data respectively.
Apache (www-data) can operate on files created by FTP (webmaster), but not vice versa.
The task, as I see it, is the equal rights of Apache and FTP.
I tried to google, probably there are a lot of answers, but I could not make a clear search query.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Koryukov, 2017-11-21
@MadridianFox

File/folder permissions are not user/group, but user: rwx + group: rwx + other: rwx, where rwx is the three rights - read, write and execute. Do ls -lit and you will see in the first column lines like: -rwxrw-r-- or something similar - these are file permissions.
To be more precise, such a record of rights consists of 10 characters
1) - or d - an indication of a file or folder (there are other options, but these are most often)
2) rwx - the first three rights are the owner's rights
3) rwx -- the second triplet of rights - the rights of the group
4) rwx -- the third triplet of rights - the rights of everyone else
Those. rwx for the owner means that he can read write and execute files.
rwx for the group means that everyone who is in the group of the file (I know it sounds strange, it would be more accurate to say - in the main group of the owner) can read write and execute. You can google
more about this . When a file is created via ftp, its owner is the user webmaster and its group is a group named webmaster (yes, there are groups with the same name as the user). Conversely, when files are created via the web, their owner is www-data and the group is appropriate. As you yourself said, there are many options, you can, for example, configure ftp to work on behalf of the same www-data.
but it's easier to just add the webmaster user to the www-data group and the www-data user to the webmaster group. Then both through the web and through ftp there will be access to all files, provided that they have normal rights for the group.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question