I
I
ILoveYAnny2017-06-01 21:02:52
linux
ILoveYAnny, 2017-06-01 21:02:52

How to automatically assign newly added files the same permissions as on a folder in Ubuntu server?

Hello, I have a folder with permission 755. When I add new files to it, via FTP from the superuser, the rights to new files are reset and I can no longer access them through Apache until I manually write chmod. The owner of the folder is Apache. How to avoid this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2017-06-01
@ILoveYAnny

the rights of the created files and folders are described in the config of your ftp server.
Or, for example, to simplify the situation, you can specify in the system configs the operation of the FTP server on behalf of the same user that Apache is running under.
there is much more to be done, but what is the question - such is the answer, because they did not provide a single technical detail except that Apache works there.

E
Erelecano Oioraen, 2017-06-01
@Erelecano

> via FTP from superuser
My mother is a mortal woman! Not only is the plaintext ftp, by which everyone sees the login-password along the way, but also from the root.
If you really want to rape the corpse of ftp, then use pure-ftpd and virtual users, and there already assign to which uid / gid the files should belong.
And it's better to stop raping ftp altogether, find out about sftp, or something.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question